forked from commonmark/cmark
-
Notifications
You must be signed in to change notification settings - Fork 97
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
merge in changes from cmark-gfm 0.29.0.gfm.11 #51
Merged
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
Currently for the autolink extensioon, only `www_match` correctly returns correct positioning when calling `cmark_node_get_start_line`/`cmark_node_get_start_column`/`cmark_node_get_end_line`/`cmark_node_get_end_column`. This PR adds positioning support for the `url_match` function.
The old --safe option is now the default, to get the previous default behavior, use the --unsafe flag. Signed-off-by: Keith Packard <[email protected]>
add_compiler_export_flags() is deprecated since CMake 3.0, and was removed a long time ago in cmark via commit abf3a7a -- but preserved in cmark-gfm's modifications.
The export header is identical between the main library and the extensions. It is generated from the same template, the libraries share the same properties, and the only difference is that they use different symbol names. Let them share a header.
cmark-gfm-core-extensions: use stdbool.h instead of private header
man: Switch --safe option for --unsafe in man page
[Autolink] Store positioning info for url_match
Fix -Wstrict-prototypes warnings
extensions: avoid useless duplication of headers
Co-authored-by: Waldir Pimenta <[email protected]>
…ent_footnote_def Expose `cmark_node_parent_footnote_def`.
fix: Links with unique targets should have unique labels
cmark-gfm/src/node.h:122:36: warning: this function declaration is not a prototype [-Wstrict-prototypes] void cmark_init_standard_node_flags(); ^ void 1 warning generated.
… deeply nested lists.
STRONG, in most rendering engines, becomes bold. Bold cannot be applied to text two times in most languages. This caps the number of times we attempt to bold text when rendering. Running `python3 -c 'pad = "_" * 100000; print(pad + "." + pad, end="")' | time ./build/src/cmark-gfm --to $LANG` Before: ``` ./build/src/cmark-gfm --to plaintext > /dev/null 12.29s user 0.00s system 99% cpu 12.321 total ./build/src/cmark-gfm --to commonmark > /dev/null 25.97s user 0.01s system 99% cpu 26.026 total ./build/src/cmark-gfm --to html > /dev/null 0.01s user 0.00s system 43% cpu 0.033 total ./build/src/cmark-gfm --to man > /dev/null 12.91s user 0.00s system 99% cpu 12.938 total ./build/src/cmark-gfm --to latex > /dev/null 13.13s user 0.01s system 99% cpu 13.159 total ``` After: ``` ./build/src/cmark-gfm --to plaintext > /dev/null 0.01s user 0.01s system 39% cpu 0.030 total ./build/src/cmark-gfm --to commonmark > /dev/null 0.01s user 0.00s system 41% cpu 0.031 total ./build/src/cmark-gfm --to html > /dev/null 0.01s user 0.00s system 38% cpu 0.030 total ./build/src/cmark-gfm --to man > /dev/null 0.01s user 0.01s system 40% cpu 0.030 total ./build/src/cmark-gfm --to latex > /dev/null 0.01s user 0.00s system 39% cpu 0.033 total ```
This reverts commit c72487d.
Fix strict prototype clang warning
fix test/regression.txt regression
Fix quadratic list indexing in commonmark/man/plaintext output formats
…t-cmark-gfm Limit the depth of nested lists
Co-authored-by: Bas Alberts <[email protected]>
…brackets-overflow Fix bug in fuzz harness
…ut-formats Add other output formats to the quadratic fuzzer
Bump version and start Changelog for 0.29.0.gfm.11
rdar://107716414
I've confirmed that tests still work both via |
daniel-grumberg
approved these changes
Apr 28, 2023
This was referenced Apr 28, 2023
QuietMisdreavus
added a commit
that referenced
this pull request
May 3, 2023
…/gfm.11 Un-revert #51 and fix Windows build errors
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.
This merges in upstream changes from cmark-gfm, bringing our base version from gfm.8 to gfm.11. Notably, this includes some new public APIs and fixes for two upstream security issues.
I made a change on top of the upstream code to make the "enable safety checks" setting thread-safe. I don't expect this to be used from Swift-DocC's multithreaded code, but i've made it a point to guard as many statics as i could behind locks, so this one joins the rest.
The most notable merge-conflict change between upstream cmark-gfm and swift-cmark was the way that the export header(s) were configured, since we have a pre-generated copy in the repo for use by the Swift package. Pointing the extensions code to use the base export header seemed to work, both for the Swift package as well as the Makefile. There were also a couple conflicting spots in the code where i'd added something in the same spot as upstream. Otherwise, this PR is all code from upstream.