mmarkdown / mmark

Mmark: a powerful markdown processor in Go geared towards the IETF
https://mmark.miek.nl
Other
480 stars 45 forks source link

Warn on non-ASCII punctuation #215

Closed str4d closed 11 months ago

str4d commented 11 months ago

What went wrong?

The mmark syntax guide says that it enables the Smartypants extension by default, expanding -- into an en-dash. I couldn't get this to work, so I added a manual en-dash in a suggestion to a pre-RFC.

However, the RFC Editor has informed me that:

We use ASCII equivalents for punctuation per the "Use of non-ASCII characters” section of the "Web Portion of the Style Guide” (https://www.rfc-editor.org/styleguide/part2/#nonascii).

It might be helpful for mmark to detect and warn on non-ASCII punctuation (though presumably some authors may still want to render with it in non-RFC situations).

What version of mmark are you using?

2.2.39

What is the most minimal markdown snippets that shows the problem?

Diffie–Hellman

Diffie--Hellman

renders to:

<?xml version="1.0" encoding="utf-8"?>
<!-- name="GENERATOR" content="github.com/mmarkdown/mmark Mmark Markdown Processor - mmark.miek.nl" -->
<t>Diffie–Hellman</t>
<t>Diffie--Hellman</t>
miekg commented 11 months ago

update smartypants comment as that only works for html in https://github.com/mmarkdown/mmark/commit/ef81939369599aa9df4f333b474f77270d4dc844

mmark warned about non-ascii when the ugly workaround <u> was implemented in xml2rfc. This has since been removed as xml2rfc is 100% utf8 and ietf documents can now just use that encoding (and characters).

See https://github.com/ietf-tools/xml2rfc/commit/ad2e0359fde4687e07491a1ada0ec0d4f6ee5fcc and https://github.com/ietf-tools/xml2rfc/releases/tag/v3.16.0

As there is no new RFCXML rfc I don't know what the rfc-editor is clinging to 7991 and not using these features.

In short: I think this can be closes as WAI ?

str4d commented 11 months ago

update smartypants comment as that only works for html

Thanks, that explains why I was having trouble 😅

As there is no new RFCXML rfc I don't know what the rfc-editor is clinging to 7991 and not using these features.

I have confirmation from the RFC Editor that the authoritative document for RFCXML v3 is now https://authors.ietf.org/en/rfcxml-vocabulary (which notes this at its top, but I hadn't spotted it because I'd only ever linked into the middle of the page).

I think the issue here is not the RFCXML vocabulary, but the style guide. It's the latter that was being cited here, and I am completely unfamiliar with how that document is updated, or how mmark users generally interact with it. Maybe the better way to reframe this issue would be as an idea to add a style linter flag?

miekg commented 11 months ago

the problem with that is that I would be following a non-RFC document that receives updates and I would need to track.

The core of the issue is that RFCXML is a moving target and that the RFC editor's style guide is not published as an RFC.

closing as desired by unfeasible