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

Double quotes and <code> #647

Closed
ietf-svn-bot opened this issue Jun 22, 2021 · 9 comments
Closed

Double quotes and <code> #647

ietf-svn-bot opened this issue Jun 22, 2021 · 9 comments
Labels
minor text Issues in text output

Comments

@ietf-svn-bot
Copy link

resolution_fixed type_defect | by martin.thomson@gmail.com


The current text rendering for <code> in xml2rfc adds double-quotes around the element. This is encouraging people to avoid the use of this decoration.

Please change the text rendering so that quotes are not used. Or, adjust the definition of <code> so that this can be controlled.

Rationale

In HTML, <code> is usually rendered with a fixed-width font, but no additional quoting. This is good, because it makes the code identifiable, but does not involve additional characters, which might make the quoted contents ambiguous.

Take the following example from RFC 7540:

That is, the connection preface starts with the string <code>PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n</code>. 

In HTML, this renders without quotes, which can mean that it is hard to clearly distinguish the content of the text from other content of the document. I would like to quote this string explicitly as follows:

That is, the connection preface starts with the string "<code>PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n</code>". 

But that would render with double double-quotes in text form, which would not be good. The difference in rendering between text and HTML is the main problem.

One thing that I have observed is that the code here reflects a desire to have some text-level signal whenever an XML element is employed. We can see that with <aside> also (https://trac.tools.ietf.org/tools/xml2rfc/trac/ticket/438) where I agree with Julian that the "|" rendering is unnecessarily being used to distinguish between asides and empty lists with no bullets.

This is another example of this incorrect principle being applied. The text rendering can't express all the things that HTML can. It shouldn't even try and it is creating inconsistencies that make authoring documents more difficult.


Issue migrated from trac:647 at 2022-02-08 07:15:49 +0000

@ietf-svn-bot
Copy link
Author

@julian.reschke@gmx.de commented


You mean , not , right?

@ietf-svn-bot
Copy link
Author

@cabo@tzi.org commented


The text rendering should enable the specification of a text fallback, like the discussion about demonstrated.
(Oh, remember < spanx style="vbare" > in RFCXML classic?)

An interesting side observation when translating RFC 6125bis into markdown was that someone (the RPC?) had apparently translated all U+002D (hyphen) in snippets that looked like code into U+2011 (non-breaking hyphen). This is another example where we need to look at the rendering of codespans.

@ietf-svn-bot
Copy link
Author

@cabo@tzi.org commented


#634 for the issue.

@ietf-svn-bot
Copy link
Author

@cabo@tzi.org changed _comment0 which not transferred by tractive

@ietf-svn-bot
Copy link
Author

@cabo@tzi.org changed _comment1 which not transferred by tractive

@ietf-svn-bot
Copy link
Author

@kesara@staff.ietf.org changed status from new to closed

@ietf-svn-bot
Copy link
Author

@kesara@staff.ietf.org set resolution to fixed

@ietf-svn-bot
Copy link
Author

@kesara@staff.ietf.org commented


Fixed in 56a8754:

Remove quotes from the text rendering of . Fixes #600 and #647. Commit ready for merge.

@ietf-svn-bot
Copy link
Author

@rjsparks@nostrum.com commented


Fixed in d6838d5:

Merged in 56a8754 from krathnayake@ietf.org:\n Remove quotes from the text rendering of . Fixes #600 and #647.

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

No branches or pull requests

1 participant