-
Notifications
You must be signed in to change notification settings - Fork 326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: use consistent markup in examples #1373
Conversation
@choldgraf I think I identified all the pages with markup example. To check how it looks, I tested on 1 page and the prettier pre-commit is refactoring the tab directive with "````". As you have more experience with md. could you advise what's happening ? I'm writing the following and there seems to be conflicts between "```". What should I do ?
|
I finally followed instructions from here: https://myst-parser.readthedocs.io/en/latest/syntax/roles-and-directives.html#nesting-directives. That's very dificult to read but that works. |
@@ -7,9 +7,20 @@ This is [similar to how the TOML language defines nested configuration](https:// | |||
|
|||
For example, to remove the secondary sidebar, we use a page metadata key like this: | |||
|
|||
`````{tab-set} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep this is the right way to do it. If you want to I believe that you can indent everything within the directive just to make it easier to read.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI indentation does not work (which is a shame because it does help readability of the source). It yields
File "/opt/mambaforge/envs/pst/lib/python3.11/site-packages/sphinx_design/tabs.py", line 243, in run
tab_label, tab_content = tab_item.children
^^^^^^^^^^^^^^^^^^^^^^
ValueError: not enough values to unpack (expected 2, got 1)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that I get I think we can leave it as it is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have time to go through this in a lot of detail, but in general it looks good to me and I'm +1 on merging this and then making gradual improvements from there because I think it's a clear improvement!
argh, was in the middle of reviewing this. I'll open a new PR with the fixes I guess. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll submit the changes I had queued up in a separate PR
@@ -7,9 +7,20 @@ This is [similar to how the TOML language defines nested configuration](https:// | |||
|
|||
For example, to remove the secondary sidebar, we use a page metadata key like this: | |||
|
|||
`````{tab-set} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI indentation does not work (which is a shame because it does help readability of the source). It yields
File "/opt/mambaforge/envs/pst/lib/python3.11/site-packages/sphinx_design/tabs.py", line 243, in run
tab_label, tab_content = tab_item.children
^^^^^^^^^^^^^^^^^^^^^^
ValueError: not enough values to unpack (expected 2, got 1)
oupsss sorry |
WIP
Fix #1366
Try to replace all the occurence of markup example and replace them with a tab: