You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Strip Leading Whitespace From Symbol Graph Doc Comments (#1190)
* Strip the minimum leading whitespace from all doc comments loaded from
symbol graphs. This worksaround a Clang compiler issue with parsing
comments like this that are missing the leading asterisk:
/**
Foo's brief description.
Foo's discussion.
*/
...as opposed to this which Clang does parse properly:
/**
* Foo's brief description.
*
* Foo's discussion.
*/
"Minumum leading whitespace" is defined as:
- Find the doc comment line with least amount of leading whitespace.
Ignore blank lines during this search.
- Remove that number of whitespace chars from all the lines (including
blank lines).
* Update Sources/SwiftDocC/Model/DocumentationNode.swift
Refactor a loop to use `contains(where:)`
Co-authored-by: David Rönnqvist <[email protected]>
* [String].linesWithoutLeadingWhitespace returns an array
of substrings, not strings.
* [String].linesWithoutLeadingWhitespace checks for an empty collection
before continuing to parse all the lines
* Tweak comments
---------
Co-authored-by: David Rönnqvist <[email protected]>
0 commit comments