Make turndown default to using fenced code blocks #24
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This won't currently have any effect, but it will once this PR over at
turndownis merged, so it's definitely worth prepping for:mixmark-io/turndown#226
Once that PR is merged, I've confirmed locally that
typedoc-plugin-markdownwill correctly label fenced code examples that were generated from TypeDoc.So if you have a TS file such as:
TypeDoc will output the HTML as such:
Currently,
turndowndoesn't process that, as it's specifically looking for a CSS class prefix oflanguage-not the shorter versionlang-. This paradigm is all based onhighlight.jswhich supports"language-*","lang-*"or even un-prefixed as just the name of the language itself such as"html".Once that
turndownPR lands,turndownwill convert that HTML basically back into the original (ignore the extra space):