feat: making regex in bruno lang support windows line endings

This commit is contained in:
Anoop M D 2023-01-22 00:38:10 +05:30
parent 405b50edcd
commit 2e3b296021
4 changed files with 7 additions and 7 deletions

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,