-
Notifications
You must be signed in to change notification settings - Fork 143
Add support for abstract Headerdoc tag #1215
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ class DoxygenTests: XCTestCase { | |
func testDoxygenDiscussionAndNote() throws { | ||
let documentationLines: [SymbolGraph.LineList.Line] = """ | ||
This is an abstract. | ||
@abstract This is description with abstract. | ||
|
||
@discussion This is a discussion linking to ``AnotherClass`` and ``AnotherClass/prop``. | ||
|
||
|
@@ -96,6 +97,7 @@ class DoxygenTests: XCTestCase { | |
|
||
XCTAssertEqual(symbol.abstract?.format(), "This is an abstract.") | ||
XCTAssertEqual(symbol.discussion?.content.map { $0.format() }, [ | ||
#"\abstract This is description with abstract."#, | ||
#"\discussion This is a discussion linking to ``doc://unit-test/documentation/ModuleName/AnotherClass`` and ``doc://unit-test/documentation/ModuleName/AnotherClass/prop``."#, | ||
#"\note This is a note linking to ``doc://unit-test/documentation/ModuleName/Class3`` and ``Class3/prop2``."# | ||
]) | ||
|
@@ -108,10 +110,10 @@ class DoxygenTests: XCTestCase { | |
XCTAssertEqual(renderNode.primaryContentSections.count, 1) | ||
|
||
let overviewSection = try XCTUnwrap(renderNode.primaryContentSections.first as? ContentRenderSection) | ||
XCTAssertEqual(overviewSection.content.count, 3) | ||
XCTAssertEqual(overviewSection.content.count, 4) | ||
XCTAssertEqual(overviewSection.content, [ | ||
.heading(.init(level: 2, text: "Overview", anchor: "overview")), | ||
|
||
.paragraph(.init(inlineContent: [.text("This is description with abstract.")])), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we try to actually parse On the other hand, we probably shouldn't add too much Doxygen/HeaderDoc support, since we really want to push people to using Markdown... 😅 I'm fine either way on this, though i'm curious what the workgroup (or just the rest of our team) thinks. |
||
.paragraph(.init(inlineContent: [ | ||
.text("This is a discussion linking to "), | ||
.reference( | ||
|
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.
Should we avoid updating all the dependencies? Maybe we should just update the one new version of swift-markdown below. Or do we typically run
swift package update
and update everything when possible?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.
Usually with a paired PR like this, we should only run
swift package update swift-markdown
to only pull in Swift-Markdown specifically, and leave the other dependencies alone.