Skip to content

Commit

Permalink
Merge pull request #466 from vkbansal/fix-crlf
Browse files Browse the repository at this point in the history
fixes #464 crlf issue
  • Loading branch information
LeaVerou committed Jan 11, 2015
2 parents 6cac548 + b6e7da5 commit bf66348
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion plugins/show-invisibles/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ <h1>Examples</h1>


</body>
</html>
</html>
11 changes: 7 additions & 4 deletions plugins/show-invisibles/prism-show-invisibles.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@
}

.token.tab:not(:empty):before {
content: '';
content: '\21E5';
}

.token.cr:before {
content: '';
content: '\240D';
}

.token.crlf:before {
content: '\240D\240A';
}
.token.lf:before {
content: '';
}
content: '\240A';
}
7 changes: 4 additions & 3 deletions plugins/show-invisibles/prism-show-invisibles.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ if(!window.Prism) {
for (var language in Prism.languages) {
var tokens = Prism.languages[language];

tokens.tab = /\t/g;
tokens.lf = /\n/g;
tokens.tab = /\t/g;
tokens.crlf = /\r\n/g;
tokens.lf = /\n/g;
tokens.cr = /\r/g;
}

})();
})();
2 changes: 1 addition & 1 deletion plugins/show-invisibles/prism-show-invisibles.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bf66348

Please sign in to comment.