CS-Notes/docs/_style/prism-master/plugins/remove-initial-line-feed/prism-remove-initial-line-feed.min.js

1 line
328 B
JavaScript
Raw Normal View History

2018-12-19 14:09:39 +08:00
!function(){"undefined"!=typeof self&&self.Prism&&self.document&&Prism.hooks.add("before-sanity-check",function(e){if(e.code){var s=e.element.parentNode,n=/\s*\bkeep-initial-line-feed\b\s*/;!s||"pre"!==s.nodeName.toLowerCase()||n.test(s.className)||n.test(e.element.className)||(e.code=e.code.replace(/^(?:\r?\n|\r)/,""))}})}();