Skip to content

Commit

Permalink
fix jsx syntax highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacasonato committed Oct 25, 2021
1 parent 0ca3f76 commit 914a162
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
6 changes: 6 additions & 0 deletions mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ export function render(markdown: string, opts: RenderOptions = {}): string {
"class-name",
"regex",
"regex-delimiter",
"tag",
"attr-name",
"punctuation",
"script-punctuation",
"script",
"plain-text",
],
a: ["anchor"],
svg: ["octicon", "octicon-link"],
Expand Down
2 changes: 1 addition & 1 deletion style.js

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions style/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,16 @@
color: var(--color-prettylights-syntax-keyword);
}

&.tag .token.class-name,
&.tag .token.script .token.punctuation {
color: var(--color-prettylights-syntax-storage-modifier-import);
}

&.operator,
&.number,
&.boolean,
&.tag .token.punctuation,
&.tag .token.script .token.script-punctuation,
&.tag .token.attr-name {
color: var(--color-prettylights-syntax-constant);
}
Expand Down Expand Up @@ -65,9 +71,5 @@
&.tag .token.tag {
color: var(--color-prettylights-syntax-entity-tag);
}

&.tag .token.class-name {
color: var(--color-prettylights-syntax-storage-modifier-import);
}
}

0 comments on commit 914a162

Please sign in to comment.