Skip to content

Commit

Permalink
Update toit.js. (#32)
Browse files Browse the repository at this point in the history
Allows '-' in import paths.
  • Loading branch information
floitsch authored Aug 6, 2024
1 parent bf70d89 commit 3114839
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/code-block/src/toit.js
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@

switch (subState(state)) {
case IMPORT_AFTER_IMPORT:
if (!stream.match(/\.*(\.?[a-zA-Z_]\w*)+/)) return importError();
if (!stream.match(/\.*(\.?[-a-zA-Z_]\w*)+/)) return importError();
setSubState(state, IMPORT_AFTER_PATH);
return "import_path";
case IMPORT_AFTER_PATH:
Expand Down

0 comments on commit 3114839

Please sign in to comment.