Skip to content

Add-typescript#18

Draft
cad0p wants to merge 5 commits intofcurella:masterfrom
cad0p:add-typescript
Draft

Add-typescript#18
cad0p wants to merge 5 commits intofcurella:masterfrom
cad0p:add-typescript

Conversation

@cad0p
Copy link

@cad0p cad0p commented Apr 11, 2023

No description provided.

@cad0p
Copy link
Author

cad0p commented Apr 11, 2023

Picked up #8 that was referenced on #4.

Status is it's working:

➜  jsx-lexer git:(add-typescript) ✗ pygmentize -L lexers | grep -C 2 tsx
* tsql, t-sql:
    Transact-SQL (filenames *.sql)
* tsx, react-typescript:
    react-typescript (filenames *.tsx)
* turtle:
    Turtle (filenames *.ttl)
➜  jsx-lexer git:(add-typescript) ✗ pygmentize ../../typescript-app/src/index.tsx

image

@cad0p
Copy link
Author

cad0p commented Apr 11, 2023

Rebased to the current version.

Here's an example working with props

image

@cad0p
Copy link
Author

cad0p commented Apr 11, 2023

Found a bug:

image

@cad0p
Copy link
Author

cad0p commented Apr 11, 2023

Also for text inside a label that should not be colored:

image

This one should not depend on typescript!

@cad0p
Copy link
Author

cad0p commented Apr 11, 2023

Other errors:

image

Edit the first one here also happens if we use the ts lexer, while the second one only with the tsx lexer



def build_react_tokens(tokens):
tokens.update(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will need to be fixed to avoid mutating dictionaries that don’t belong to us (see #20).

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.

3 participants