Skip to content

Commit

Permalink
Added comment and fixed typo
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment committed Jan 29, 2021
1 parent 159ad50 commit 5af096e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions components/prism-docker.js
@@ -1,9 +1,12 @@
(function (Prism) {

var spaceAfterBaskSlash = /\\[\r\n](?:\s|\\[\r\n]|#.*(?!.))*(?![\s#]|\\[\r\n])/.source;
// Many of the following regexes will contain negated lookaheads like `[ \t]+(?![ \t])`. This is a trick to ensure
// that quantifiers behave *atomically*. Atomic quantifiers are necessary to prevent exponential backtracking.

var spaceAfterBackSlash = /\\[\r\n](?:\s|\\[\r\n]|#.*(?!.))*(?![\s#]|\\[\r\n])/.source;
// At least one space, comment, or line break
var space = /(?:[ \t]+(?![ \t])(?:<SP_BS>)?|<SP_BS>)/.source
.replace(/<SP_BS>/g, function () { return spaceAfterBaskSlash; });
.replace(/<SP_BS>/g, function () { return spaceAfterBackSlash; });

var string = /"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"|'(?:[^'\\\r\n]|\\(?:\r\n|[\s\S]))*'/.source;
var option = /--[\w-]+=(?:<STR>|(?!["'])(?:[^\s\\]|\\.)+)/.source.replace(/<STR>/g, function () { return string; });
Expand Down

0 comments on commit 5af096e

Please sign in to comment.