Add admonition/callout support to editor help and make_rst.py #111375
+91
−2
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.
Based on and supersedes #63079, this adds a few fixes and touch-ups to the work done by @Calinou.
This PR adds support for admonitions/callouts to the editor's help (and tooltips), as well as to the
make_rst.pyscript. Four admonition types are supported:[note], [warning],[tip], and[important]. Nesting admonitions is supported by the editor but not supported bymake_rst.py, and is not recommended.Note that these tags also work inline, but are obviously intended to be used as separate blocks. Multi-paragraph admonitions are also supported.
Converting all existing class reference XML files to this new format was removed from #63079, because of the noise it introduces in the PR, the conflicts after each rebase, and because actually converting the files is better left for a separate PR. At the time of this writing, the number of occurrences for each type of admonition is the following:
\[b\](Note|Warning|Important|Tip) *: *\[/b\] *(.+?)\n[\L\1]\2[/\L\1]\n