Skip to content

Commit

Permalink
Allow dashes in import paths. (#255)
Browse files Browse the repository at this point in the history
  • Loading branch information
floitsch authored Aug 6, 2024
1 parent 935d25c commit 7573cc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code_mirror/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 7573cc3

Please sign in to comment.