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

CommonMark code block class names #768

Closed
wants to merge 1 commit into from
Closed

CommonMark code block class names #768

wants to merge 1 commit into from

Conversation

remyrylan
Copy link

This is a very simple fix that changes TypeDoc to follow the CommonMark spec for code blocks:
https://spec.commonmark.org/0.27/ Example: https://spec.commonmark.org/0.27/#example-109

Right now TypeDoc prints out code block prefixes with lang- as the prefix, which is far I understand it, is legacy from Highlight.js. Since TypeDoc uses Highlight.js, lang-, language- and even un-prefixed values are supported... But by enforcing the CommonMark standard developers will be able to leverage other CommonMark tools with TypeDoc.

@remyrylan
Copy link
Author

remyrylan commented May 11, 2018

Looking at the tests and there are a ton of failings in there that are unrelated, looks like the CI environment needs some attention.

Edit: Just checked and everything passes for me locally. I did notice that running npm run test does automatically update the test files, so both src/test/renderer/specs/classes/_default_export_.notexportedclassname.html and src/test/renderer/specs/index.html are automatically updated to use language-* instead of lang-*

Let me know if need me to update those tests by hand or I should let it be and some automated process handles it?

@aciccarello
Copy link
Collaborator

The changes you've included so far sound good. Yeah, I'm aware of the test issues. #762 includes some fixes to how the tests are run so they aren't overwritten. I'll need to review why the models changed in the snapshot tests and correct things in a separate PR so leave things as they are until those are fixed.

@aciccarello
Copy link
Collaborator

Sweet. Looks like your markedjs/marked#1265 PR ended the need for this. Thanks for your contributions! The updated specs now use the updated prefix

<pre><code class="language-bash">$ npm install typedoc --save-dev</code></pre>
<p>Like the TypeScript compiler, TypeDoc comes with a binary that can be called from anywhere
if you install TypeDoc as a global module. The name of the executable is <code>typedoc</code>.</p>
<pre><code class="language-bash">$ npm install typedoc --global

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