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

[Markdown] Decide what to do about <var> #5354

Closed
wbamberg opened this issue May 26, 2021 · 5 comments
Closed

[Markdown] Decide what to do about <var> #5354

wbamberg opened this issue May 26, 2021 · 5 comments
Labels
MDN:Project Anything related to larger core projects on MDN

Comments

@wbamberg
Copy link
Collaborator

wbamberg commented May 26, 2021

We haven't had a conversation about this one yet. We use <var> a lot on MDN. Since there's no exact equivalent of this in GFM we need to know how to handle it.

On MDN we:

It is my understanding that in Yari, inside code blocks (<pre class="brush">), any internal markup is removed, so removing it from these in conversion to Markdown seems like an obvious choice.

For the other usages, we have some choices.

  1. Replace <var> with <em> by mapping <var>thing</var> to GFM *thing*. This would need special handling for <code><var>thing</var></code>, to generate *`thing`* instead of `*thing*`. We already do this though for <code><strong>thing</strong></code>, so I guess that wouldn't be too hard.

  2. Remove <var> when it's inside <code>, otherwise replace it with <em>.

  3. Remove it in all cases. I think this would look odd in cases where it's on its own.

  4. Keep the HTML <var> (I don't think we should do this).

Other opinions?

@wbamberg wbamberg added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label May 26, 2021
@hamishwillee
Copy link
Collaborator

I like 2, but would also mention "pre".

Remove <var> when it's inside <code> or <pre>, otherwise replace it with <em>.

Re "3" I don't think they look "odd" but IMO the highlighting is there in the first place because it makes the docs more useful/readable. FYI in GFM can be either done as _italic_ or *italic* (I prefer underscore because asterisk gets overloaded for bold and bullets).

@wbamberg
Copy link
Collaborator Author

Yeah, I like 2 best as well but would be OK with 3.

@Blakelist7
Copy link
Contributor

Blakelist7 commented Jun 3, 2021

@wbamberg Hey, can I help with the issue?

@wbamberg
Copy link
Collaborator Author

wbamberg commented Jun 3, 2021

Hey @Blakelist7 ! Not really, this is more of a "decide what we are going to do" type of issue. But I wonder if you would like to have a look at #5438 - this is an issue where I'd love to have some help.

@Rumyra Rumyra added MDN:Project Anything related to larger core projects on MDN and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Jun 7, 2021
@sideshowbarker
Copy link
Collaborator

I’m going ahead and taking the liberty of closing this, since it seems some decision must have ended up getting made about this prior to when the markdown conversion got completed last October. But if I’m missing something and there’s some reason this needs to be kept open, let’s re-open it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MDN:Project Anything related to larger core projects on MDN
Projects
None yet
Development

No branches or pull requests

5 participants