[doc] Minor tweak to md sanitisation code #20735
Merged
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 code replaces \n with a space when populating table cells. A good
idea! But it ended up leaving a double space if the source hjson had a
blank line.
There was also a bit of a mess if we have a newline followed by several
spaces. This turned into two spaces, not one.
The fix is simple: treat any number of newlines, followed by any
number of spaces as a single space. The handwritten code here is just
a 1-line change to md_helpers.py. The rest of the commit is from
regenerating the auto-generated stuff that it builds.
Note that this was annoying to create because we check in the
auto-generated registers.md for pwrmgr in a template file (presumably
manually) and then use that auto-generated file to create the
registers.md in ip_autogen. We should probably stop doing that silly
thing at some point, but my local hack was to apply the fix to the
markdown files with
and then manually copy the changed lines to the template file before
re-running
This works, but... yuck!