-
Notifications
You must be signed in to change notification settings - Fork 3.7k
fix(clj) Fix broken/inconsistent highlighting for $
, Numbers, namespaced maps, HINT mode. Add charachter, regex and punctuation modes.
#3397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
dd161d5
Match names contianing `$`
MrEbbinghaus e1fda58
Add regex for all clojure number formats
MrEbbinghaus c7f1f47
Add character highlighting
MrEbbinghaus 7af493c
Fix inconsistent namespaced map highlighting
MrEbbinghaus 82850bd
Add regex highlighting
MrEbbinghaus 7cd7549
Remove HINT mode from clojure
MrEbbinghaus 3048320
Remove incorrect code from test
MrEbbinghaus cbb6d4e
Add punctuation mode for comma
MrEbbinghaus 5b45dbd
Add latest clojure fixes to CHANGES.md
MrEbbinghaus f3c6a21
Add more tests for different numbers
MrEbbinghaus 70c463f
Break up Number regex into maintainable parts
MrEbbinghaus 4ee86ac
Break up Character regex into maintainable parts
MrEbbinghaus 0d1cdfe
Set relevance for single character match to 0.
MrEbbinghaus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,50 @@ | ||
<span class="hljs-comment">; integer</span> | ||
<span class="hljs-number">00</span> | ||
<span class="hljs-number">42</span> | ||
|
||
<span class="hljs-comment">; BigInt</span> | ||
<span class="hljs-number">42N</span> | ||
<span class="hljs-number">0N</span> | ||
|
||
<span class="hljs-comment">; octal</span> | ||
<span class="hljs-number">052</span> | ||
<span class="hljs-number">00N</span> | ||
|
||
<span class="hljs-comment">; hex</span> | ||
<span class="hljs-number">0x2a</span> | ||
<span class="hljs-number">0x0N</span> | ||
|
||
<span class="hljs-comment">; radix</span> | ||
<span class="hljs-number">2r101010</span> | ||
<span class="hljs-number">8r52</span> | ||
<span class="hljs-number">16r2a</span> | ||
<span class="hljs-number">36r16</span> | ||
|
||
<span class="hljs-comment">; radix BigInt</span> | ||
<span class="hljs-number">2r101010N</span> | ||
<span class="hljs-number">8r52N</span> | ||
<span class="hljs-number">16r2aN</span> | ||
<span class="hljs-number">36r16N</span> | ||
|
||
<span class="hljs-comment">;; ratios</span> | ||
<span class="hljs-number">1/2</span> | ||
<span class="hljs-number">-1/2</span> | ||
|
||
<span class="hljs-comment">;; floats</span> | ||
<span class="hljs-number">42.0</span> | ||
<span class="hljs-number">-42.0</span> | ||
<span class="hljs-number">42.</span> | ||
|
||
<span class="hljs-comment">; BigDecimal</span> | ||
<span class="hljs-number">42.0M</span> | ||
<span class="hljs-number">-42M</span> | ||
<span class="hljs-number">42.M</span> | ||
<span class="hljs-number">42M</span> | ||
|
||
<span class="hljs-comment">; with Exponent</span> | ||
<span class="hljs-number">42.0E2</span> | ||
<span class="hljs-number">-42.0E+9</span> | ||
<span class="hljs-number">42E-0</span> | ||
|
||
<span class="hljs-number">42.0E2M</span> | ||
<span class="hljs-number">42E+9M</span> |
This file contains hidden or 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,50 @@ | ||
; integer | ||
00 | ||
42 | ||
|
||
; BigInt | ||
42N | ||
0N | ||
|
||
; octal | ||
052 | ||
00N | ||
|
||
; hex | ||
0x2a | ||
0x0N | ||
|
||
; radix | ||
2r101010 | ||
8r52 | ||
16r2a | ||
36r16 | ||
|
||
; radix BigInt | ||
2r101010N | ||
8r52N | ||
16r2aN | ||
36r16N | ||
|
||
;; ratios | ||
1/2 | ||
-1/2 | ||
|
||
;; floats | ||
42.0 | ||
-42.0 | ||
42. | ||
|
||
; BigDecimal | ||
42.0M | ||
-42M | ||
42.M | ||
42M | ||
|
||
; with Exponent | ||
42.0E2 | ||
-42.0E+9 | ||
42E-0 | ||
|
||
42.0E2M | ||
42E+9M |
This file contains hidden or 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 |
---|---|---|
@@ -1 +1,4 @@ | ||
(<span class="hljs-keyword">def</span> <span class="hljs-title">+x</span> [(<span class="hljs-name">a</span> <span class="hljs-number">1</span>) <span class="hljs-number">+2</span> <span class="hljs-number">-3.0</span> y-5]) | ||
(<span class="hljs-name">System/getProperty</span> <span class="hljs-string">"java.vm.version"</span>) | ||
(<span class="hljs-name">.getEnclosingClass</span> java.util.Map$Entry) | ||
(<span class="hljs-name">java.util.Map$Entry.</span> .getEnclosingClass) |
This file contains hidden or 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 |
---|---|---|
@@ -1 +1,4 @@ | ||
(def +x [(a 1) +2 -3.0 y-5]) | ||
(System/getProperty "java.vm.version") | ||
(.getEnclosingClass java.util.Map$Entry) | ||
(java.util.Map$Entry. .getEnclosingClass) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.