summaryrefslogtreecommitdiff
path: root/std/encoding/toml.ts
diff options
context:
space:
mode:
Diffstat (limited to 'std/encoding/toml.ts')
-rw-r--r--std/encoding/toml.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/std/encoding/toml.ts b/std/encoding/toml.ts
index bd6814ac3..121459dbf 100644
--- a/std/encoding/toml.ts
+++ b/std/encoding/toml.ts
@@ -218,7 +218,7 @@ class Parser {
}
// If binary / octal / hex
- const hex = /(0(?:x|o|b)[0-9a-f_]*)[^#]/gi.exec(dataString);
+ const hex = /^(0(?:x|o|b)[0-9a-f_]*)[^#]/gi.exec(dataString);
if (hex && hex[0]) {
return hex[0].trim();
}