mirror of
https://github.com/usebruno/bruno.git
synced 2025-02-02 10:59:22 +01:00
feat: making regex in bruno lang support windows line endings
This commit is contained in:
parent
405b50edcd
commit
2e3b296021
@ -63,8 +63,8 @@ const bodyXmlTag = between(bodyXmlBegin)(bodyEnd)(everyCharUntil(bodyEnd)).map((
|
|||||||
// generic key value parser
|
// generic key value parser
|
||||||
const newline = regex(/^\r?\n/);
|
const newline = regex(/^\r?\n/);
|
||||||
const newLineOrEndOfInput = choice([newline, endOfInput]);
|
const newLineOrEndOfInput = choice([newline, endOfInput]);
|
||||||
const wordWithoutWhitespace = regex(/^[^\s\t\n]+/g);
|
const wordWithoutWhitespace = regex(/^[^\s\t\r?\n]+/g);
|
||||||
const wordWithWhitespace = regex(/^[^\n]+/g);
|
const wordWithWhitespace = regex(/^[^\r?\n]+/g);
|
||||||
|
|
||||||
const line = sequenceOf([
|
const line = sequenceOf([
|
||||||
optionalWhitespace,
|
optionalWhitespace,
|
||||||
|
@ -16,8 +16,8 @@ const newLineOrEndOfInput = choice([newline, endOfInput]);
|
|||||||
|
|
||||||
const begin = regex(/^vars\s*\r?\n/);
|
const begin = regex(/^vars\s*\r?\n/);
|
||||||
const end = regex(/^[\r?\n]*\/vars\s*[\r?\n]*/);
|
const end = regex(/^[\r?\n]*\/vars\s*[\r?\n]*/);
|
||||||
const wordWithoutWhitespace = regex(/^[^\s\t\n]+/g);
|
const wordWithoutWhitespace = regex(/^[^\s\r?\t\n]+/g);
|
||||||
const wordWithWhitespace = regex(/^[^\n]+/g);
|
const wordWithWhitespace = regex(/^[^\r?\n]+/g);
|
||||||
|
|
||||||
const line = sequenceOf([
|
const line = sequenceOf([
|
||||||
optionalWhitespace,
|
optionalWhitespace,
|
||||||
|
@ -17,7 +17,7 @@ const newLineOrEndOfInput = choice([newline, endOfInput]);
|
|||||||
const begin = regex(/^headers\s*\r?\n/);
|
const begin = regex(/^headers\s*\r?\n/);
|
||||||
const end = regex(/^[\r?\n]*\/headers\s*[\r?\n]*/);
|
const end = regex(/^[\r?\n]*\/headers\s*[\r?\n]*/);
|
||||||
const wordWithoutWhitespace = regex(/^[^\s\t\n]+/g);
|
const wordWithoutWhitespace = regex(/^[^\s\t\n]+/g);
|
||||||
const wordWithWhitespace = regex(/^[^\n]+/g);
|
const wordWithWhitespace = regex(/^[^\r?\n]+/g);
|
||||||
|
|
||||||
const line = sequenceOf([
|
const line = sequenceOf([
|
||||||
optionalWhitespace,
|
optionalWhitespace,
|
||||||
|
@ -17,8 +17,8 @@ const newLineOrEndOfInput = choice([newline, endOfInput]);
|
|||||||
|
|
||||||
const begin = regex(/^params\s*\r?\n/);
|
const begin = regex(/^params\s*\r?\n/);
|
||||||
const end = regex(/^[\r?\n]*\/params\s*[\r?\n]*/);
|
const end = regex(/^[\r?\n]*\/params\s*[\r?\n]*/);
|
||||||
const wordWithoutWhitespace = regex(/^[^\s\t\n]+/g);
|
const wordWithoutWhitespace = regex(/^[^\s\t\r?\n]+/g);
|
||||||
const wordWithWhitespace = regex(/^[^\n]+/g);
|
const wordWithWhitespace = regex(/^[^\r?\n]+/g);
|
||||||
|
|
||||||
const line = sequenceOf([
|
const line = sequenceOf([
|
||||||
optionalWhitespace,
|
optionalWhitespace,
|
||||||
|
Loading…
Reference in New Issue
Block a user