Open brycelelbach opened 6 years ago
I was talking to someone (can't remember who) about italic terms. I think there aren't that many of them (implementation-defined, see below, etc)... Those could be attributes on the <xmp>
tag, with a few defaults for lang=c++
.
For red/green lines, I have no opinion.
What if we handled all of these by adding a hook for custom preprocessing passes that run on code blocks to bikeshed? This would allow us to customize code blocks in WG21 bikeshed documents without disturbing markdown parsing for other spec groups. It could also give us the ability for individual documents to customize their parsing via a special <pre>
block that Bikeshed recognizes, just like metadata.
<ins>
and <del>
should be simple enough to handle specially in code blocks/<xmp>
if it's the only HTML markup we are recognizing. We could even create a different syntax if needed or desired, such as @+
/+@
and @-
/-@
, e.g void foo(@+double+@@-int-@ a);
instead of void foo(<ins>double</ins><del>int</del>
.implementation-defined
, unspecified
, and see below
(a full list can be scraped from the C++ latex source). Note that I don't want to handle them in highlighting; I prefer to turn off syntax highlighting as I feel it makes it too hard to see which things are <ins>
d and <del>
d. Alternatively, instead of disabling syntax highlighting, I could look into a way to customize the syntax highlighting. This is probably the better long term solution, because I would like some non-color based syntax highlighting (comments in italics, matching the ISO style, and possibly keywords in bold).style="font-family: serif; font-style: italic;"
) - this is done in the definition of std::tuple
, for example, where we want something like <code>get<<math>I</math>></code>
. We might be able to handle these cases by special casing <math>
and <i>
, just like <ins>
and <del>
, but then things become more complicated because you might want to nest those tags, which means doing some actual parsing (e.g. we would need to handle <ins><i>whatever</i></ins>
).
A rendered bikeshed document describing this issue can be found here.