Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use rehype-highlight instead of remark-highlight.js & Update highlight theme to GitHub #160

Merged
merged 3 commits into from
Jun 26, 2021

Conversation

josemarluedke
Copy link
Owner

This will allow us to get the glimmer grammar for better highlight.

cc/ @NullVoxPopuli

Currently including highlightjs-glimmer breaks with the following error:


  - broccoliBuilderErrorStack: TypeError: Cannot read property 'length' of undefined
    at /Users/josemarluedke/code/oss/frontile/node_modules/highlight.js/lib/core.js:420:15
    at Array.map (<anonymous>)
    at join (/Users/josemarluedke/code/oss/frontile/node_modules/highlight.js/lib/core.js:414:18)
    at MultiRegex.compile (/Users/josemarluedke/code/oss/frontile/node_modules/highlight.js/lib/core.js:880:31)
    at ResumableMultiRegex.getMatcher (/Users/josemarluedke/code/oss/frontile/node_modules/highlight.js/lib/core.js:951:15)
    at ResumableMultiRegex.exec (/Users/josemarluedke/code/oss/frontile/node_modules/highlight.js/lib/core.js:972:22)
    at _highlight (/Users/josemarluedke/code/oss/frontile/node_modules/highlight.js/lib/core.js:2003:35)
    at Object.highlight (/Users/josemarluedke/code/oss/frontile/node_modules/highlight.js/lib/core.js:1626:9)
    at highlight (/Users/josemarluedke/code/oss/frontile/node_modules/lowlight/lib/core.js:48:17)
    at Object.highlightAuto (/Users/josemarluedke/code/oss/frontile/node_modules/lowlight/lib/core.js:94:15)
  - code: [undefined]
  - codeFrame: Cannot read property 'length' of undefined
  - errorMessage: Cannot read property 'length' of undefined
        at DocfyBroccoli

@josemarluedke josemarluedke added the Type: Documentation Improvements or additions to documentation label May 1, 2021
@josemarluedke josemarluedke changed the title Replace rehype-highlight instead or remark-highlight.js Use rehype-highlight instead of remark-highlight.js May 1, 2021
@NullVoxPopuli
Copy link

Is it just glimmer, or any language? My tests earlier broke on any language.

For glimmer, we may need to wait for highlightjs v11, and then lowlight to support it, and then rehype

@josemarluedke josemarluedke changed the title Use rehype-highlight instead of remark-highlight.js Use rehype-highlight instead of remark-highlight.js & Update highlight theme to GitHub Jun 26, 2021
@josemarluedke josemarluedke merged commit abf8f3d into main Jun 26, 2021
@josemarluedke josemarluedke deleted the docs/rehype-highlight branch June 26, 2021 02:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants