Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Some valid numbers are highlighted incorrectly #89

Closed
1 task done
MrEbbinghaus opened this issue Dec 11, 2021 · 0 comments · Fixed by #90
Closed
1 task done

Some valid numbers are highlighted incorrectly #89

MrEbbinghaus opened this issue Dec 11, 2021 · 0 comments · Fixed by #90

Comments

@MrEbbinghaus
Copy link
Contributor

Prerequisites

Description

Some valid Clojure numbers are not correctly detected.

Steps to Reproduce

Have a look at GitHubs highlighting: All these Numbers are valid Clojure Numbers:
You can find the reference here: https://clojure.org/reference/reader#_literals

; integer ; BigInt  ; octal   ; hex
00          42N     052       0x2a
42          0N      00N       0x0N

; radix.  ; radix BigInt
2r101010  2r101010N
8r52      8r52N
16r2a     16r2aN
36r16     36r16N

;; ratios  ;; floats
1/2        42.0
-1/2       -42.0
           42.

; BigDecimal ; with Exponent
42.0M        42.0E2
-42M         -42.0E+9
42.M         42E-0
42M          42.0E2M
             42E+9M

Screenshot from Atom:
image

Proof, that these are valid numbers:
image

Expected behavior: They should be highlighted correctly.
Actual behavior: Does not highlight correctly
Reproduces how often: 100%

Versions

Atom : 1.58.0
Electron: 9.4.4
Chrome : 83.0.4103.122
Node : 12.14.1

Related issues

BetterThanTomorrow/calva#1378
highlightjs/highlight.js#3397

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant