mirror of
https://github.com/denoland/deno.git
synced 2025-09-27 20:59:10 +00:00
fix(std/toml): parser error with inline comments (#6942)
This commit is contained in:
parent
e9d713c007
commit
d615ebefe2
3 changed files with 4 additions and 3 deletions
|
@ -280,7 +280,7 @@ class Parser {
|
|||
return dataString.slice(0, endOfString);
|
||||
}
|
||||
|
||||
const m = /(?:|\[|{|).*(?:|\]||})\s*[^#]/g.exec(dataString);
|
||||
const m = /(?:|\[|{).*(?:|\]|})\s*^((?!#).)*/g.exec(dataString);
|
||||
if (m) {
|
||||
return m[0].trim();
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue