@toml-tools/lexer
Advanced tools
Comparing version 0.3.1 to 0.3.2
@@ -103,3 +103,3 @@ /* eslint-disable no-unused-vars */ | ||
name: "LiteralMultiLineString", | ||
pattern: makePattern`'''(?:${f.ML_LITERAL_CHAR}|${Newline})*'''`, | ||
pattern: makePattern`('''|""")(?:${f.ML_LITERAL_CHAR}|${Newline})*\\1`, | ||
categories: [IString] | ||
@@ -106,0 +106,0 @@ }); |
{ | ||
"name": "@toml-tools/lexer", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "TOML Lexer Implemented in JavaScript", | ||
@@ -21,4 +21,3 @@ "keywords": [ | ||
"access": "public" | ||
}, | ||
"gitHead": "5b378848b9efa8636e672a455d379065a6af69b2" | ||
} | ||
} |
@@ -8,6 +8,16 @@ const { tokenize } = require("../"); | ||
title = "TOML Example" | ||
description1 = ''' | ||
Some | ||
multiline | ||
description | ||
''' | ||
description2 = """ | ||
Some | ||
multiline | ||
description | ||
""" | ||
`; | ||
const lexingResult = tokenize(input); | ||
expect(lexingResult.errors).to.be.empty; | ||
expect(lexingResult.tokens).to.have.lengthOf(6); | ||
expect(lexingResult.tokens).to.have.lengthOf(14); | ||
const tokenImages = lexingResult.tokens.map(tok => tok.image); | ||
@@ -20,2 +30,10 @@ expect(tokenImages).to.deep.equal([ | ||
'"TOML Example"', | ||
"\n", | ||
"description1", | ||
"=", | ||
"'''\nSome\nmultiline\ndescription\n'''", | ||
"\n", | ||
"description2", | ||
"=", | ||
'"""\nSome\nmultiline\ndescription\n"""', | ||
"\n" | ||
@@ -22,0 +40,0 @@ ]); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
306
10640
1