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

Some valid numbers are highlighted incorrectly #89

@MrEbbinghaus

Description

@MrEbbinghaus

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions