Skip to content

Conversation

@jmert
Copy link
Contributor

@jmert jmert commented Apr 18, 2021

This PR is a mostly-automatic update based on pygments/pygments#1715 to update and improve Julia syntax highlighting. The specific sequence of changes is documented below to show where the automatic conversion from pygments was insufficient.


$ PYTHONPATH=~/devel/pygments/ \
    python3 _tools/pygments2chroma.py pygments.lexers.JuliaLexer \
    > lexers/j/julia_new.go

$ gofmt -s -w lexers/j/julia_new.go 
lexers/j/julia_new.go:41:36: escape sequence is invalid Unicode code point

$ sed -e 's@\\udbff\\udfff@\\U0010ffff@g' -i lexers/j/julia_new.go
$ gofmt -s -w lexers/j/julia_new.go 

# Copy and paste the contents of `Rules{` block from julia_new.go to julia.go
#   since the pygments2chroma.py converter does not create the lazy lexer
#   code format.

$ rm lexers/j/julia_new.go

@alecthomas alecthomas merged commit f4cddf0 into alecthomas:master Apr 18, 2021
@alecthomas
Copy link
Owner

Nice thanks.

@jmert jmert deleted the julia branch April 18, 2021 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants