-
Notifications
You must be signed in to change notification settings - Fork 147
Support thematic breaks #865
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
Support thematic breaks #865
Conversation
Tests/SwiftDocCTests/Rendering/RenderBlockContent_ThematicBreakTests.swift
Outdated
Show resolved
Hide resolved
Sources/SwiftDocC/Model/Rendering/Content/RenderBlockContent.swift
Outdated
Show resolved
Hide resolved
Tests/SwiftDocCTests/Rendering/RenderContentCompilerTests.swift
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works perfectly for me 👍 - although as you say DocC Render doesn't support this yet but I see the same block content type appear in Render JSON.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this 😄 A minor note - when we make changes to a file, we also need to update the year in the license header, like this: 202X-2024
, besides that, this pr looks good to me.
It does now as of this PR: swiftlang/swift-docc-render#791 :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@swift-ci Please test |
Fix typo in RenderContentCompilerTests resolve some PR feedback Update Sources/SwiftDocC/Model/Rendering/Content/RenderBlockContent.swift Co-authored-by: David Rönnqvist <[email protected]> add tests with multiple variants of thematic breaks Don't enforce unique filenames for documentation extensions (swiftlang#863) * Allow documentation extensions to have the same name Since documentation extensions' filenames have no impact on the URL of any pages, there's no need to enforce unique filenames for them. DocC currently uses only the filename / last path component of articles to determine if there is a duplicate article. This change excludes doc extensions from that check to allow documentation extensions to have the same filename. rdar://117174884 * Add test to ensure doc extensions can have the same filename Checks that doc extensions with the same filename do not produce a warning and DocC no longer drops the content from one of the files. Update the year in license headers Bump patch version
7f69445
to
505b285
Compare
@swift-ci please test |
Bug/issue #: rdar://124275218
Summary
Markdown supports thematic breaks (aka horizontal rules) that are represented by placing three or more hyphens, asterisks, or underscores on a separate line, surrounded by blank lines. This PR adds support for thematic breaks within Swift DocC, adding a
thematicBreak
element in the render JSON.[Minor fix]: also fixed a consistent typo in RenderContentCompilerTests.
Dependencies
DocC render needs to add support in order to render this thematic break from the render JSON.
Testing
Create a thematic break by add three or more hyphens, asterisks, or underscores on a separate line, surrounded by blank lines, and compile the documentation. The render JSON for the data type should now include an element of type "thematicBreak".
Checklist
Make sure you check off the following items. If they cannot be completed, provide a reason.
./bin/test
script and it succeeded