Skip to content
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

Sync in changes made to cmark-gfm after 2021-08-01 #29

Merged
merged 51 commits into from
Mar 16, 2022

Conversation

QuietMisdreavus
Copy link

In August and September, GitHub made various updates to cmark-gfm to re-enable footnotes. This PR pulls in the upsream changes to the gfm branch so that we can have those fixes in Swift-DocC as well.

There were also updates to the testing scripts and an additional configuration for GitHub Actions. The latter doesn't affect this repo since we don't use GitHub Actions.

I've tested these changes by manually loading them into swift-markdown and swift-docc and ensuring that the tests pass. Note that the local test suite doesn't completely pass due to changes we made to support inline attributes. A fix for that will come in a later PR (which will also help #28).

phillmv and others added 30 commits August 3, 2021 12:16
Python 3.8 has removed the cgi.escape function, which had been
deprecated since version 3.2. html.escape does the same thing, use
that instead.

Signed-off-by: Keith Packard <[email protected]>
When two footnote references are adjacent, the handle_close_bracket
function will first try to match the closing bracket to a link
reference. Now we reset the subject's state, so that the parser
correctly picks up both footnote references.
…ark_nodes.

Sometimes, the autolinker will go ahead and greedily split input into
multiple text nodes in the hopes of matching a hyperlink. This broke
footnotes, which expected a singular node. Instead of relying on the
tokenizing to have worked perfectly, when handling footnote references
we now simply insert the reference based on the closing bracket and
ignore and delete any existing and superfluous nodes.
When a footnote is referenced multiple times, we now insert multiple
backrefs linking back to each reference. In order to do this, we had to
change how footnote ref link labels work away from an incrementing
index, and instead use footnote reference label text *plus* an index.
Move CI build over to Actions, per `@jgm`'s upstream work.
…ade sure to free allocated string in commonmark.c
phillmv and others added 8 commits September 15, 2021 12:18
Add data attributes for easier styling within dotcom. Also, add the aria-label for accessibility.
…nkrefs-autolinker

Fix footnotes: nested, confused for link refs & mangled by the autolinker
…fnref-label-and-backrefs

Fix footnotes plus fix footnote reference labels and backrefs
anticomputer and others added 3 commits February 22, 2022 14:38
* added explicit check for UINT16_MAX boundary on row->n_columns

* added additional checks for row_from_string NULL returns to prevent NULL
dereferences on error cases

* added additional check to ensure n_columns between marker and header rows
always match prior to any alignment processing

* allocate alignment array based on marker rows rather than header rows

* prevent memory leak on dangling node when encountering row_from_string
error in try_opening_table_row

* add explicit integer overflow error marker to not overload offset semantics
in row_from_string with other implied error conditions
@QuietMisdreavus
Copy link
Author

I've updated this PR to include the changes from GHSA-mc3g-88wq-6f4x (effectively just the version number bump and the commit history, because the patch itself was merged in #36), bringing this up to date with the current github/master.

compiler:
- c: 'clang'
cpp: 'clang++'
- c: 'gcc'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does that make sense on macOS

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If gcc is available on macOS in GitHub Actions (i assume so since this is an upstream change), i guess they want to make sure to test it. However, this doesn't affect our fork, since we don't use GitHub Actions.

@QuietMisdreavus QuietMisdreavus force-pushed the QuietMisdreavus/sync-upstream branch from 2cd664e to 131078b Compare March 10, 2022 21:06
@QuietMisdreavus
Copy link
Author

I rebased this PR to include new changes on gfm.

@daniel-grumberg daniel-grumberg self-requested a review March 11, 2022 13:55
Copy link

@daniel-grumberg daniel-grumberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't actually looked into all of this, but this just upstream stuff right?

@QuietMisdreavus
Copy link
Author

Yeah, it's all upstream. The only change on top of that is to update the readme to remove the GitHub Actions badge.

@QuietMisdreavus QuietMisdreavus merged commit ef4622f into gfm Mar 16, 2022
@QuietMisdreavus QuietMisdreavus deleted the QuietMisdreavus/sync-upstream branch March 16, 2022 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants