-
Notifications
You must be signed in to change notification settings - Fork 193
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
allow custom cmark options and extensions when converting Markdown #23
Open
QuietMisdreavus
wants to merge
3
commits into
swiftlang:main
Choose a base branch
from
QuietMisdreavus:custom-cmark-opts
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
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
@swift-ci Please test |
2 tasks
nighthawk
added a commit
to maparoni/down-gfm
that referenced
this pull request
Mar 12, 2022
Changes: - Removes embedded `cmark` in favour of [`apple/swift-cmark`](https://github.com/apple/swift-cmark) - Removes AST code in favour of [`apple/swift-markdown`](https://github.com/apple/swift-markdown) - Removes DebugVisitor in favour of `document.debugDescription()` from `swift-markdown` - Support tasklist/checkbox Later: - Restore ordered list starts, depends on: swiftlang/swift-markdown#22 - Restore various Down options, depends on: swiftlang/swift-markdown#23
QuietMisdreavus
force-pushed
the
custom-cmark-opts
branch
from
July 11, 2022 22:15
4ee335c
to
60e33a6
Compare
Rebased onto the latest |
QuietMisdreavus
force-pushed
the
custom-cmark-opts
branch
from
September 12, 2022 20:38
60e33a6
to
16d3a7d
Compare
Rebased to resolve merge conflict. @swift-ci Please test |
QuietMisdreavus
force-pushed
the
custom-cmark-opts
branch
from
November 15, 2022 18:03
16d3a7d
to
aec5871
Compare
CreatureSurvive
added a commit
to CreatureSurvive/swift-markdown
that referenced
this pull request
Dec 31, 2023
CreatureSurvive
added a commit
to CreatureSurvive/swift-markdown
that referenced
this pull request
Dec 31, 2023
When will this pr be merged? |
Any updates for this PR? |
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.
Bug/issue #, if applicable: n/a
Summary
Currently, swift-markdown uses a static set of options and extensions when converting Markdown source. However, there are several options and unused extensions in cmark-gfm that could be used. This PR adds a new
ConvertOptions
type to wrap the existingParseOptions
type with additional information that is passed to cmark-gfm when converting.Dependencies
None
Testing
markdown-tool
has been extended to allow custom extensions (and to allow disabling the default extensions). With the following Markdown file, runswift run markdown-tool dump-tree test.md
. Compare the results with no flags, when adding--no-default-extensions
, when adding--extension autolink
, and with both.Checklist
Make sure you check off the following items. If they cannot be completed, provide a reason.
./bin/test
script and it succeeded