Format term lists in markdown export#1544
Conversation
|
|
||
| Here is some post-list content |
There was a problem hiding this comment.
minor: This markup is never verified in this test.
| Here is some post-list content |
|
|
||
| Shows how term lists are represented in markdown output | ||
|
|
||
| ## Overview | ||
|
|
||
| Here is some content |
There was a problem hiding this comment.
minor: This markup is never verified in this test.
| Shows how term lists are represented in markdown output | |
| ## Overview | |
| Here is some content |
| } | ||
|
|
||
|
|
||
| func testTermList() async throws { |
There was a problem hiding this comment.
Same feedback as in your other PR:
Please use Swift Testing for all new tests. See the "Adding new tests" section of the contributing document for more details.
|
|
||
|
|
||
| func testTermList() async throws { | ||
| let content = """ |
There was a problem hiding this comment.
nit: The other tests in this file define the content inline in the catalog.
| if let indentationToRemove, output.hasPrefix(indentationToRemove) { | ||
| output.removeFirst(indentationToRemove.count) | ||
| } | ||
| // Format term lists after processing other elements |
There was a problem hiding this comment.
This comment would benefit from a before and after example to highlight the formatting differences.
| Spring: The first season of the year | ||
| Summer: The second season of the year | ||
| `Code`: A code voice item used as a term |
There was a problem hiding this comment.
I'm a bit surprised that this is the indented formatting. I would at least expect the content to continue be list items.
Bug/issue #, if applicable: 166128254
Summary
Term lists were not formatted correctly in markdown exports. This PR re-formats outputted term lists as follows:
Input:
Previous output was exactly the same as the input. New output is:
Dependencies
N/A
Testing
Steps:
docc converton the documentation with the--enable-experimental-markdown-outputflag enabledChecklist
Make sure you check off the following items. If they cannot be completed, provide a reason.
./bin/testscript and it succeeded