Skip to content

Bug in 1.12-rc1 version - wrong character colored? #10

@BioTurboNick

Description

@BioTurboNick

Hello,

Just tested out the current state of this in 1.12-rc1, and noticed one odd issue:

using JuliaSyntaxHighlighting
a = """function foo(x::AbstractArray{<:Integer{{Bar}}, 3})\n    findfirst('z', (("happy"))) === nothing == [0x40, 0x52, 0x62, [[0x63]]] += 2 # Test `me`\nend""" # Not intended to be real code, just to demonstrate syntax
"function foo(x::AbstractArray{<:Integer{{Bar}}, 3})\n    findfirst('z', ((\"happy\"))) === nothing == [0x40, 0x52, 0x62, [[0x63]]] += 2 # Test `me`\nend"
write(stdout, JuliaSyntaxHighlighting.highlight(a))
Image

For the character string 'z', the first quote mark is white while the preceding parenthesis has its color.

Julia Version 1.12.0-rc1
Commit 228edd6610 (2025-07-12 20:11 UTC)
Build Info:
  Official https://julialang.org release
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 12 × Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
  WORD_SIZE: 64
  LLVM: libLLVM-18.1.7 (ORCJIT, skylake)
  GC: Built with stock GC
Threads: 1 default, 1 interactive, 1 GC (on 12 virtual cores)

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