Repository navigation
Conversation
…te and blockTemplate Both functions read the template's style after substituting. A value from parse, parseDocument or another template keeps positions from its own text, so its markers were looked up in the template's text. A character such as `H` was then taken for a marker, and rendering threw. Read the style before substituting, as documentOf already does, so it comes from the template's own text.
…s with parsed values Say why the style is read before substituting, so nobody inlines it back.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Rendering
templateorblockTemplatecould throw an error when a value came from parsed text and had formatting. Those values now work, as they already did intemplateDocumentandinlineTemplate.The template's style was read after the values went in, so a value's positions in its own text were looked up in the template's text. The style now comes from the template's own text.
What failed
A value with emphasis, strong text, a list or a rule could fail, depending on which characters of the template its positions landed on. It could come from any of these:
parseparseDocumentWhat else changes
When those characters were valid markers, the value set the template's markers with no error. That output changes:
Usage