-
Notifications
You must be signed in to change notification settings - Fork 198
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
👌 IMPROVE: Allow heading_slug_func to be a string #696
Conversation
Codecov ReportBase: 89.72% // Head: 89.67% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #696 +/- ##
==========================================
- Coverage 89.72% 89.67% -0.06%
==========================================
Files 22 22
Lines 2658 2674 +16
==========================================
+ Hits 2385 2398 +13
- Misses 273 276 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
`myst_heading_slug_func` can now also be set to a string, which will be interpreted as an import path to a function, e.g. `myst_heading_slug_func = "mypackage.mymodule.slugify"`.
d067de5
to
eb655a5
Compare
`myst_heading_slug_func` can now also be set to a string, | ||
which will be interpreted as an import path to a function, | ||
e.g. `myst_heading_slug_func = "mypackage.mymodule.slugify"`. | ||
::: |
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.
Greate change, thank you.
I think it would be better to add an advice. Something like:
You should set this parameter as string to avoid unnecessary rebuild of a project.
It will save a lot of time for other people.
Avoid creating an uncacheable conf variable by using a string instead of a function reference. Also has the effect of avoiding triggering the "config.cache" sphinx warning. Requires myst_parser 0.19.0 (specifically executablebooks/MyST-Parser#696) which is over a year old by now. Do we mandate any minimum version for these dependencies?
Avoid creating an uncacheable conf variable by using a string instead of a function reference. Also has the effect of avoiding triggering the "config.cache" sphinx warning. Requires myst_parser 0.19.0 (specifically executablebooks/MyST-Parser#696) which is over a year old by now. Do we mandate any minimum version for these dependencies?
myst_heading_slug_func
can now also be set to a string,which will be interpreted as an import path to a function,
e.g.
myst_heading_slug_func = "mypackage.mymodule.slugify"
.