Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(elixir) Support function names/symbols with a slash (#2406)
- Do not mistake code like `import Kernel, except: [ /: 2 ]` as the beginning of a regex, which causes highlighting to break. - `/:`, `+:`, are still not considered symbols This solves the problem by making the pattern `/: \d` an exception case that is never treated as a regex. For most cases, most of the time this should be a win. Resolves #730.
- Loading branch information
1 parent
4bc39be
commit 3f2b813
Showing
4 changed files
with
28 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<span class="hljs-keyword">import</span> Kernel, <span class="hljs-symbol">except:</span> [ | ||
<span class="hljs-symbol">spawn:</span> <span class="hljs-number">1</span>, | ||
+: <span class="hljs-number">2</span>, | ||
/: <span class="hljs-number">2</span>, | ||
<span class="hljs-symbol">Unless:</span> <span class="hljs-number">2</span> | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import Kernel, except: [ | ||
spawn: 1, | ||
+: 2, | ||
/: 2, | ||
Unless: 2 | ||
] |