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

parameter updates in documentation #206

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/Markdown/Block Nodes/Tables/Table.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public extension Table {
///
/// - parameter columnAlignments: An optional list of alignments for each column,
/// truncated or expanded with `nil` to fit the table's maximum column count.
/// - parameter head: A ``Table/Head-swift.struct`` element serving as the table's head.
/// - parameter header: A ``Table/Head-swift.struct`` element serving as the table's head.
/// - parameter body: A ``Table/Body-swift.struct`` element serving as the table's body.
init(columnAlignments: [ColumnAlignment?]? = nil,
header: Head = Head(),
Expand Down
2 changes: 1 addition & 1 deletion Sources/Markdown/Markdown.docc/Markdown/DoxygenCommands.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Doxygen commands are not parsed within code blocks or block directive content.

- ``DoxygenDiscussion``
- ``DoxygenNote``
- ``DoxygenParam``
- ``DoxygenParameter``
- ``DoxygenReturns``

<!-- Copyright (c) 2023 Apple Inc and the Swift Project authors. All Rights Reserved. -->
2 changes: 1 addition & 1 deletion Sources/Markdown/Visitor/MarkupVisitor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public protocol MarkupVisitor<Result> {
/**
Visit an `InlineAttributes` element and return the result.

- parameter attribute: An `InlineAttributes` element.
- parameter attributes: An `InlineAttributes` element.
- returns: The result of the visit.
*/
mutating func visitInlineAttributes(_ attributes: InlineAttributes) -> Result
Expand Down
11 changes: 6 additions & 5 deletions Sources/Markdown/Walker/Walkers/MarkupFormatter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,9 @@ public struct MarkupFormatter: MarkupWalker {
- emphasisMarker: The character to use for emphasis and strong emphasis markers.
- condenseAutolinks: Print links whose link text and destination match as autolinks, e.g. `<https://swift.org>`.
- preferredHeadingStyle: The preferred heading style.
- lineLimit: The preferred maximum line length and method for splitting ``Text`` elements in an attempt to maintain that line length.
- preferredLineLimit: The preferred maximum line length and method for splitting ``Text`` elements in an attempt to maintain that line length.
- customLinePrefix: An addition prefix to print at the start of each line, useful for adding documentation comment markers.
- doxygenCommandPrefix: The command command prefix, which defaults to ``DoxygenCommandPrefix/backslash``.
*/
public init(unorderedListMarker: UnorderedListMarker = .dash,
orderedListNumerals: OrderedListNumerals = .allSame(1),
Expand Down Expand Up @@ -345,7 +346,7 @@ public struct MarkupFormatter: MarkupWalker {
/// The length of the last line.
var lastLineLength = 0

/// The line number of the most recently printed content.
/// The line number of the most recently printed content.
///
/// This is updated in `addressPendingNewlines(for:)` when line breaks are printed.
var lineNumber = 0
Expand Down Expand Up @@ -543,7 +544,7 @@ public struct MarkupFormatter: MarkupWalker {
state.currentLength += prefix.count
state.lastLineLength += prefix.count
}

result += rawText
state.currentLength += rawText.count
state.lastLineLength += rawText.count
Expand Down Expand Up @@ -734,7 +735,7 @@ public struct MarkupFormatter: MarkupWalker {
}
descendInto(listItem)
}

public mutating func visitHeading(_ heading: Heading) {
if heading.indexInParent > 0 {
ensurePrecedingNewlineCount(atLeast: 2)
Expand Down Expand Up @@ -1153,7 +1154,7 @@ public struct MarkupFormatter: MarkupWalker {
print(attributes.attributes, for: attributes)
print(")", for: attributes)
}

printInlineAttributes()

// Inline attributes *can* have their key-value pairs split across multiple
Expand Down