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.
I just discovered the recent program update doesn't handle the case where the contents of
<program><code>
does not include any newlines. Samples:<program>print("Hello")</program>
<program><code>print("Hello")</code></program>
substring-before-last
is being used to clean up the trailing whitespace, but that template returns''
if there is no newline. So currently, the code in those samples is dropped.First commit adds a parma to
substring-before-last
that allows the caller to ask for the $input back if there is no match. That generates clean diffs for sample-book and sample-article in all formats.Other commits use that to fix pretext-html and adds a test case to the sample article.
Sorry about this one, I missed that this test case was no where in sample-book or article and thus not getting checked.