katoikia-app/web-ui/web-react/node_modules/prismjs/plugins/show-invisibles/prism-show-invisibles.js

22 lines
350 B
JavaScript
Raw Normal View History

2022-07-06 04:15:11 +00:00
(function(){
if (
typeof self !== 'undefined' && !self.Prism ||
typeof global !== 'undefined' && !global.Prism
) {
return;
}
Prism.hooks.add('before-highlight', function(env) {
var tokens = env.grammar;
if (!tokens) return;
tokens.tab = /\t/g;
tokens.crlf = /\r\n/g;
tokens.lf = /\n/g;
tokens.cr = /\r/g;
tokens.space = / /g;
});
})();