We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 492a306 commit 7290d44Copy full SHA for 7290d44
utils/snippetParser.js
@@ -16,10 +16,12 @@ function raise(issue, snippet = '') {
16
return null;
17
}
18
19
+const crlfRegex = /\r\n/gm;
20
const propertyRegex = /^\s+([a-zA-Z]+):\s*(.+)/;
21
const headerEndCodeStartRegex = /^\s*---\s*```.*\n/;
22
const codeRegex = /^(.+)```/s
23
function parseSnippet(snippetPath, text) {
24
+ if(crlfRegex.exec(text) !== null) return raise('Found CRLF line endings instead of LF line endings', snippetPath);
25
let cursor = 0;
26
27
const fromCursor = () => text.substring(cursor);
0 commit comments