Open rahilb opened 8 months ago
Swift-Markdown is based the GitHub-Flavored Markdown specification, which allows one or two tildes for strikethrough. The formatting is only meant to be semantically equivalent to the input, not textually equivalent. We can use this issue to track configurable strikethrough markers, though, so that your example can still format as desired.
It is expected that if I parse and then format a markdown document I should be able to get a rendered string that is identical to the input string, i.e. it should be possible to satisfy the condition
markdownString == (parse(markdownString).format())
However parsing the following document:
and immediately calling
.format()
results in the following string:
ExtendedMark defines strikethrough using
~~
https://www.markdownguide.org/extended-syntax/#strikethroughCommonmark does not specify Strikethrough elements and all the specifications I can find call for
~~
.The library is able to parse the strikethrough element, e.g.
Suggestion: Rendering of the
Strikethrough
ADT element should be configurable or changed to render as~~
.