Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BCP 14 boilerplate detection #44

Open
martinthomson opened this issue Oct 29, 2024 · 2 comments
Open

BCP 14 boilerplate detection #44

martinthomson opened this issue Oct 29, 2024 · 2 comments

Comments

@martinthomson
Copy link

 7  Error
 └- Code - MISSING_REQLEVEL_REF
 └- Desc - An RFC2119 boilerplate is present but no reference to the RFC2119 was found.
 └- Ref  - https://www.rfc-editor.org/rfc/rfc7322.html#section-4.8.2

That's a an understandable error, but one that could be fixed.

I'm using kramdown-rfc's {::boilerplate bcp14-tagged-bcp}.

@rjsparks
Copy link
Member

Hi Martin - please clarify what change you're looking for?

@martinthomson
Copy link
Author

Sure, I was a bit terse...

The boilerplate in question looks like this:

      <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCP¤14 <xref target="BCP14"/> when, and only when, they
appear in all capitals, as shown here.</t>

Presumably, this should be detected as acceptable.

There are a few interesting quirks to this:

  • The string "BCP 14" uses a non-breaking space. (The topic of a <nobr> element is ongoing, so I anticipate this sticking around for a while to avoid a very awkward wrap in the text output.)

  • This uses a reference to BCP 14 rather than RFCs 2119 and 8174.

  • This uses <bcp14> elements. Some documents will not.

These are all variations that should be tolerated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants