Skip to content

save custom ordered list start index in render JSON #53

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

Merged
merged 2 commits into from
Oct 5, 2022

Conversation

QuietMisdreavus
Copy link
Contributor

@QuietMisdreavus QuietMisdreavus commented Dec 8, 2021

Bug/issue #, if applicable: rdar://73847907

Summary

While cmark-gfm saves the starting index for an ordered list, swift-markdown currently discards this information. This PR is part of a set to preserve this starting index when rendering documentation.

Dependencies

swiftlang/swift-markdown#22

Testing

Add the following markdown to Sources/SwiftDocC/SwiftDocC.docc/SwiftDocC.md:

2. this is a test
3. this is a test

Steps:

  1. Build the associated swift-docc-render branch (use ordered list start index when rendering swift-docc-render#30) and set $DOCC_HTML_DIR to the resulting dist directory.
  2. bin/preview-docs
  3. Ensure that the added list correctly starts with the index 2.

Checklist

Make sure you check off the following items. If they cannot be completed, provide a reason.

  • Added tests
  • Ran the ./bin/test script and it succeeded
  • Updated documentation if necessary

@QuietMisdreavus
Copy link
Contributor Author

@swift-ci Please test

@QuietMisdreavus
Copy link
Contributor Author

Rebased to resolve merge conflict and to bring up to date with the swift-markdown PR.

@swift-ci Please test

Copy link
Contributor

@franklinsch franklinsch left a comment

Choose a reason for hiding this comment

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

Looks great, thanks!

Package.resolved Outdated
"branch": "main",
"revision": "69f31f83a5dca9a3401d3e8fc8ff74804b0dd0ca",
"branch": "list-numbering",
"revision": "0cdc7269aa395115e50b25f388ffd184a4f04787",
Copy link
Contributor

Choose a reason for hiding this comment

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

Small reminder to un-stage this before merging

@QuietMisdreavus
Copy link
Contributor Author

@swift-ci Please test

@QuietMisdreavus QuietMisdreavus merged commit a3c31ee into swiftlang:main Oct 5, 2022
@QuietMisdreavus QuietMisdreavus deleted the list-numbering branch October 5, 2022 18:41
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.

3 participants