-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Make syntax highlighting same for MD code blocks and code in a C…
…anvas (#397)
- Loading branch information
Showing
5 changed files
with
347 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,195 @@ | ||
module.exports = [ | ||
{ | ||
types: ['comment'], | ||
style: { | ||
color: 'var(--nlds-code-block-comment-color)', | ||
fontStyle: 'var(--nlds-code-block-comment-font-style)', | ||
}, | ||
}, | ||
{ | ||
types: ['prolog'], | ||
style: { | ||
color: 'var(--nlds-code-block-prolog-color)', | ||
fontStyle: 'var(--nlds-code-block-prolog-font-style)', | ||
}, | ||
}, | ||
{ | ||
types: ['cdata'], | ||
style: { | ||
color: 'var(--nlds-code-block-cdata-color)', | ||
fontStyle: 'var(--nlds-code-block-cdata-font-style)', | ||
}, | ||
}, | ||
{ | ||
types: ['punctuation'], | ||
style: { | ||
color: 'var(--nlds-code-block-punctuation-color)', | ||
}, | ||
}, | ||
{ | ||
types: ['deleted'], | ||
style: { | ||
color: 'var(--nlds-code-block-deleted-color)', | ||
fontStyle: 'var(--nlds-code-block-deleted-font-style)', | ||
}, | ||
}, | ||
{ | ||
types: ['symbol'], | ||
style: { | ||
color: 'var(--nlds-code-block-symbol-color)', | ||
}, | ||
}, | ||
{ | ||
types: ['property'], | ||
style: { | ||
color: 'var(--nlds-code-block-property-color)', | ||
}, | ||
}, | ||
{ | ||
types: ['tag'], | ||
style: { | ||
color: 'var(--nlds-code-block-tag-color)', | ||
}, | ||
}, | ||
{ | ||
types: ['operator'], | ||
style: { | ||
color: 'var(--nlds-code-block-operator-color)', | ||
}, | ||
}, | ||
{ | ||
types: ['keyword'], | ||
style: { | ||
color: 'var(--nlds-code-block-keyword-color)', | ||
}, | ||
}, | ||
{ | ||
types: ['boolean'], | ||
style: { | ||
color: 'var(--nlds-code-block-boolean-color)', | ||
}, | ||
}, | ||
{ | ||
types: ['number'], | ||
style: { | ||
color: 'var(--nlds-code-block-number-color)', | ||
}, | ||
}, | ||
{ | ||
types: ['constant'], | ||
style: { | ||
color: 'var(--nlds-code-block-constant-color)', | ||
}, | ||
}, | ||
{ | ||
types: ['function'], | ||
style: { | ||
color: 'var(--nlds-code-block-function-color)', | ||
}, | ||
}, | ||
{ | ||
types: ['builtin'], | ||
style: { | ||
color: 'var(--nlds-code-block-builtin-color)', | ||
}, | ||
}, | ||
{ | ||
types: ['char'], | ||
style: { | ||
color: 'var(--nlds-code-block-char-color)', | ||
}, | ||
}, | ||
{ | ||
types: ['selector'], | ||
style: { | ||
color: 'var(--nlds-code-block-selector-color)', | ||
fontStyle: 'var(--nlds-code-block-selector-font-style)', | ||
}, | ||
}, | ||
{ | ||
types: ['doctype'], | ||
style: { | ||
color: 'var(--nlds-code-block-doctype-color)', | ||
fontStyle: 'var(--nlds-code-block-doctype-font-style)', | ||
}, | ||
}, | ||
{ | ||
types: ['attr-name'], | ||
style: { | ||
color: 'var(--nlds-code-block-attr-name-color)', | ||
fontStyle: 'var(--nlds-code-block-attr-name-font-style)', | ||
}, | ||
}, | ||
{ | ||
types: ['inserted'], | ||
style: { | ||
color: 'var(--nlds-code-block-inserted-color)', | ||
fontStyle: 'var(--nlds-code-block-inserted-font-style)', | ||
}, | ||
}, | ||
{ | ||
types: ['string'], | ||
style: { | ||
color: 'var(--nlds-code-block-string-color)', | ||
}, | ||
}, | ||
{ | ||
types: ['url'], | ||
style: { color: 'var(--nlds-code-block-url-color)' }, | ||
}, | ||
{ | ||
types: ['entity'], | ||
style: { | ||
color: 'var(--nlds-code-block-entity-color)', | ||
}, | ||
}, | ||
{ | ||
types: ['class-name'], | ||
style: { | ||
color: 'var(--nlds-code-block-class-name-color)', | ||
}, | ||
}, | ||
{ | ||
types: ['atrule'], | ||
style: { | ||
color: 'var(--nlds-code-block-atrule-color)', | ||
}, | ||
}, | ||
{ | ||
types: ['attr-value'], | ||
style: { | ||
color: 'var(--nlds-code-block-attr-value-color)', | ||
}, | ||
}, | ||
{ | ||
types: ['regex'], | ||
style: { | ||
color: 'var(--nlds-code-block-regex-color)', | ||
}, | ||
}, | ||
{ | ||
types: ['important'], | ||
style: { | ||
color: 'var(--nlds-code-block-important-color)', | ||
fontWeight: 'bold', | ||
}, | ||
}, | ||
{ | ||
types: ['variable'], | ||
style: { | ||
color: 'var(--nlds-code-block-variable-color)', | ||
}, | ||
}, | ||
{ | ||
types: ['bold'], | ||
style: { | ||
fontWeight: 'bold', | ||
}, | ||
}, | ||
{ | ||
types: ['italic'], | ||
style: { | ||
fontStyle: 'italic', | ||
}, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
f20656d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
documentatie – ./
documentatie.vercel.app
documentatie-git-main-nl-design-system.vercel.app
documentatie-nl-design-system.vercel.app