Hyphen between digits renders as dash
CompletedApologies in advance if this is (a) documented somewhere in MMD Composer, (b) a macOS setting or quirk that I've missed, or (c) part of the Markdown specification.
In Composer (5.0.0 – 2022.09.21.19.15), if I type a digit followed by hyphen and then another digit, in the preview pane the hyphen renders as a dash ("en rule"). If I type digit-hyphen-letter, the hyphen remains a hyphen. In Composer's prefs I have "Smart quote replacement" turned off.
I know that using a dash between digits is often good editorial practice, but I'd prefer to avoid this behaviour. To me it's unexpected, and I haven't seen it in other MD editors or converters such as Pandoc. Is there a workaround?
-
That's part of the smart quote behavior within MultiMarkdown itself (not macOS smart quotes). Disable smart quote functionality within the MultiMarkdown preference pane, but be aware that this will turn off all smart typography (single/double quotes, ellipses, m/n-dashes).
Alternatively use a backslash before the hyphen to escape it.
Markdown does not offer any "smart quote"/"advanced typography" functionality, so it's not part of the spec. There was a separate program by Gruber that added some of this (SmartyPants.pl).
0 -
Thanks, and apologies. I couldn't work out where that behaviour was coming from. I value MMD features like tables, so I tend to forget that Markdown is not the same as MultiMarkdown.
0
Please sign in to leave a comment.
Comments
2 comments