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 fixes #88 and properly parses code as regular blocks where its contents are treated as plain text.
Prior to this code blocks behaved like directives and we did a few hacks to get the rendered markdown to display as text.
Had to re-implement supporting substitutions in code blocks since we can no longer rely on
SubstitutionBlock
being part of its AST.As for code callouts:
A code block can include
<\d+>
at the end to indicate code callouts. A code block with this style of callouts needs to be followed by an ordered list with an equal amount of items as called out. Otherwise the docs-builder will throw an error.magic mode
We will also support 'magic' callouts:
Here nothing needs to be numbered and
// Set up the api key
will be removed from the code block and rendered as the first callout.This currently works for comments starting with
//
and#
which will cover the majority of languages.Note the comments have the follow code to be hoisted as a callout.
This style will allow the callouts to render correctly and for the embedded code to be still syntactically correct.