-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add expand and allow custom root section options #1689
Add expand and allow custom root section options #1689
Conversation
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.
Thanks for the pull request! Please update the docs and tests.
Thanks for taking a look @sapegin . I have just added tests. The syntax highlighting test here that I modified was failing even though I hadn't touched it so I made it look like the value it was expecting. I can revert that if it's not needed. I don't know if I also had to include an updated snapshot |
Codecov Report
|
This is because Prism was updated at some point, and the snapshot is already fixed in master. |
docs/Configuration.md
Outdated
@@ -136,6 +136,12 @@ Defines the initial state of the example code tab: | |||
- `hide`: hide the tab and it can´t be toggled in the UI. | |||
- `expand`: expand the tab by default. | |||
|
|||
## `expand` |
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'm confused: this isn't a global configuration option, right? If so, we should document it here:
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.
Thank you!
src/loaders/utils/getSections.ts
Outdated
@@ -88,6 +88,7 @@ export function processSection( | |||
} | |||
|
|||
return { | |||
...section, | |||
name: section.name, |
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.
We don't need this line anymore, and also description
and external
below.
To be clear, should I undo my change with the highlightCode.spec.ts file? |
Try to merge master into your branch. |
🎉 This PR is included in version 11.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Thanks for the reviews and accepting my PR @sapegin |
This addresses #1674 which allows user set and
expand
setting for each root section. It also sends all custom options from the user through to be usable