-
Notifications
You must be signed in to change notification settings - Fork 9
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
build: Generate headings with anchors #270
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
firebase-deployment for 5785632 |
juliaogris
commented
Feb 10, 2024
camh-
reviewed
Feb 10, 2024
juliaogris
commented
Feb 10, 2024
Rework `walk` function in the Markdown generation. We now allow for nodes not only to be modified but also to be replaced or deleted.
Generate headings with anchors with md tool, in the same way GitHub creates anchors on .md pages. Use the same style of IDs: heading text with all non-letter/numbers replaced by single dash. Link: https://stackoverflow.com/questions/43273842/what-are-the-rules-of-converting-one-markdown-title-into-an-html-anchor/44443100#44443100
Closing this as it seems too complicated for what we are trying to achieve here in favor of #272 . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Generate headings with anchors with md tool, in the same way GitHub creates
anchors on .md pages. Use the same style of IDs: heading text with all
non-letter/numbers replaced by single dash.
In preparatory step rework
walk
function in the Markdown generation. We nowallow for nodes not only to be modified but also to be replaced or deleted.
For what we are trying to achieve here this might be over-kill, but it is
preparatory work for building a multiple-choice test generator.
It seems more correct to me to add a new type of node called anchoredHeading,
as it seems to be a different thing to an ordinary heading. in the markdown
page, Tasks are also explicitly modeled when used instead of unordered
lists.
I'll put up an alternative PR that is just straight-forward overriding the
markdown.Heading.PrintHTML function for comparison.
Link: https://stackoverflow.com/questions/43273842/what-are-the-rules-of-converting-one-markdown-title-into-an-html-anchor/44443100#44443100
Issue: evylang/todo#61
Fixes evylang/todo#61