Documentation enhancement: support markdown alerts#2054
Documentation enhancement: support markdown alerts#2054yuri-kiss merged 28 commits intoTurboWarp:masterfrom
Conversation
improves consistency
CubesterYT
left a comment
There was a problem hiding this comment.
Haven't tested yet, but here are some changes I think could be made
|
I'll test this now. |
|
Now the next step going forward, is removing the tests in Simple3D, and actually go through all documentations and utilizing these new features, and then this PR should be ready |
Must every extension utilize these? I think they would be more efficient in larger extensions like Simple3D and AR but I don't think things like Bitwise or local storage should have them |
I meant looking through documentations that actually could utilize these. I know some docs actually have things like notes/important/warnings, etc., and we could update them with these. |
I'm not surprised, CSS isn't too hard to learn |
|
I've added a warning to the "precision mode" performance note in Box2D. I figure the best way to go about including these in documentation is to just go through all the extensions in order one by one |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
This one is tricky, because the extension's colors are purple and the "important" alert doesn't stand out immediately. A "tip" would be better color-wise but doesn't really fit the context.
yuri-kiss
left a comment
There was a problem hiding this comment.
Other than this it looks good to me
|
|
||
| const match = | ||
| /^\s*>\s*\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)]\s*(.*)/.exec(marker); | ||
| if (!match) return false; |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
There was a problem hiding this comment.
okay, the build was failing and I wanted it to fail gracefully, but I'll add the throw. Thanks for clarifying
|
Not sure if I fully understood what you were asking for, but I think this should do it? |
|
No, I just broke it. |
This comment was marked as abuse.
This comment was marked as abuse.
|
@yuri-kiss doing your suggested change always returns an error of match |
This comment was marked as abuse.
This comment was marked as abuse.
…s is a test? moi changes :pwease:
|
@yuri-kiss it's not working and fails on every documentation page immediately, even if there is no alert. Also fails for alerts done correctly. |
This comment was marked as abuse.
This comment was marked as abuse.
|
If it looks like the screenshots then I like it, it's cool |
Still have a few issues and things to work out before this is ready to be merged, but I'm abnormally busy with life right now so I'll get around to it whenever I can |
|
I've added a comment above the alert icons with a link to the source SVG and fixed the format issues. I'll do the "rest" after I get some "rest" |
|
@yuri-kiss the commit I just pushed should make this merge-ready |
|
Some things still don't work... attempting to use note types that aren't all caps doesn't throw an error, eg., no warning is passed when doing |
This comment was marked as abuse.
This comment was marked as abuse.
Should I make it case-insensitive so things like |




#2050
This is a simple pull request that adds support for alerts in extension documentation markdown files:
Note
Useful information that users should know, even when skimming content.
Tip
Helpful advice for doing things better or more easily.
Important
Key information users need to know to achieve their goal.
Warning
Urgent info that needs immediate user attention to avoid problems.
Caution
Advises about risks or negative outcomes of certain actions.
Some of the CSS is messy and the rule was poorly designed and I kind of rushed this