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
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())
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.
rahilb
changed the title
Strikethrough text is reformatted by format()
Strikethrough rendering should be configurable
Feb 29, 2024
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~~
.The text was updated successfully, but these errors were encountered: