Closed sabina-talipova closed 5 months ago
Talked about internally, essentially we need to either update a regex which is liable to just create issues elsewhere, or switch to a different system such as:
Callout blocks are converted as follows:
old syntax | new syntax |
---|---|
info | NOTE |
note | NOTE |
hint | TIP |
warning | WARNING |
notice | WARNING |
alert | CAUTION |
I used the below script for catching automatic changes (ran it separately over developer-docs, this copy is for userhelp but the only difference is the $modules
array):
The regex is based off the regex that's currently used to render callout blocks. Since we know that doesn't perfectly catch all callout blocks I also manually ran a text search to look for any that the regex missed.
Note that most of the userhelp docs didn't have any changes, so there's no PR for them.
@GuySartorelli Assigned back to you to do follow up PR
@GuySartorelli have merged PRs, assigning back to you to check things work as expected
Things render correctly now! 🎉
Description
[notes]
or[hint]
are displayed as plain text instead of being properly styled.Some examples:
[note]
[how_tos/handle_nested_data]
.[hint]
.Related issue
Updates
There is another related issue with links. The relative links to the articles on https://docs.silverstripe.org/ is not rendered correctly If they are in content of callout blocks. If link is part of plain text of paragraph everything works. E.g. :
[Environment Types](/developer_guides/debugging/environment_types)
will be processed inhttps://docs.silverstripe.org/developer_guides/debugging/environment_types
instead ofhttps://docs.silverstripe.org/en/5/developer_guides/debugging/environment_types/
.Acceptance criteria
Notes
PRs
Assign back to Guy after merging so they can double check everything is working correctly