File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -620,6 +620,9 @@ struct MarkupParser {
620
620
if !options. contains ( . disableSourcePosOpts) {
621
621
cmarkOptions |= CMARK_OPT_SOURCEPOS
622
622
}
623
+ if options. contains ( . onlyParseStrikethroughDoubleTilde) {
624
+ cmarkOptions |= CMARK_OPT_STRIKETHROUGH_DOUBLE_TILDE
625
+ }
623
626
624
627
let parser = cmark_parser_new ( cmarkOptions)
625
628
Original file line number Diff line number Diff line change @@ -30,5 +30,8 @@ public struct ParseOptions: OptionSet {
30
30
31
31
/// Disable including a `data-sourcepos` attribute on all block elements during parsing.
32
32
public static let disableSourcePosOpts = ParseOptions ( rawValue: 1 << 4 )
33
+
34
+ /// Only parse strikethroughs if surrounded by exactly 2 tildes.
35
+ public static let onlyParseStrikethroughDoubleTilde = ParseOptions ( rawValue: 1 << 5 )
33
36
}
34
37
You can’t perform that action at this time.
0 commit comments