forked from extern/bruno
feat: making regex in bruno lang support windows line endings
This commit is contained in:
@@ -63,8 +63,8 @@ const bodyXmlTag = between(bodyXmlBegin)(bodyEnd)(everyCharUntil(bodyEnd)).map((
|
||||
// generic key value parser
|
||||
const newline = regex(/^\r?\n/);
|
||||
const newLineOrEndOfInput = choice([newline, endOfInput]);
|
||||
const wordWithoutWhitespace = regex(/^[^\s\t\n]+/g);
|
||||
const wordWithWhitespace = regex(/^[^\n]+/g);
|
||||
const wordWithoutWhitespace = regex(/^[^\s\t\r?\n]+/g);
|
||||
const wordWithWhitespace = regex(/^[^\r?\n]+/g);
|
||||
|
||||
const line = sequenceOf([
|
||||
optionalWhitespace,
|
||||
|
@@ -16,8 +16,8 @@ const newLineOrEndOfInput = choice([newline, endOfInput]);
|
||||
|
||||
const begin = regex(/^vars\s*\r?\n/);
|
||||
const end = regex(/^[\r?\n]*\/vars\s*[\r?\n]*/);
|
||||
const wordWithoutWhitespace = regex(/^[^\s\t\n]+/g);
|
||||
const wordWithWhitespace = regex(/^[^\n]+/g);
|
||||
const wordWithoutWhitespace = regex(/^[^\s\r?\t\n]+/g);
|
||||
const wordWithWhitespace = regex(/^[^\r?\n]+/g);
|
||||
|
||||
const line = sequenceOf([
|
||||
optionalWhitespace,
|
||||
|
@@ -17,7 +17,7 @@ const newLineOrEndOfInput = choice([newline, endOfInput]);
|
||||
const begin = regex(/^headers\s*\r?\n/);
|
||||
const end = regex(/^[\r?\n]*\/headers\s*[\r?\n]*/);
|
||||
const wordWithoutWhitespace = regex(/^[^\s\t\n]+/g);
|
||||
const wordWithWhitespace = regex(/^[^\n]+/g);
|
||||
const wordWithWhitespace = regex(/^[^\r?\n]+/g);
|
||||
|
||||
const line = sequenceOf([
|
||||
optionalWhitespace,
|
||||
|
@@ -17,8 +17,8 @@ const newLineOrEndOfInput = choice([newline, endOfInput]);
|
||||
|
||||
const begin = regex(/^params\s*\r?\n/);
|
||||
const end = regex(/^[\r?\n]*\/params\s*[\r?\n]*/);
|
||||
const wordWithoutWhitespace = regex(/^[^\s\t\n]+/g);
|
||||
const wordWithWhitespace = regex(/^[^\n]+/g);
|
||||
const wordWithoutWhitespace = regex(/^[^\s\t\r?\n]+/g);
|
||||
const wordWithWhitespace = regex(/^[^\r?\n]+/g);
|
||||
|
||||
const line = sequenceOf([
|
||||
optionalWhitespace,
|
||||
|
Reference in New Issue
Block a user