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

Syntax highlighting breaks Formal Syntax for CSSSyntax #2963

Closed
fiji-flo opened this issue Feb 17, 2021 · 9 comments
Closed

Syntax highlighting breaks Formal Syntax for CSSSyntax #2963

fiji-flo opened this issue Feb 17, 2021 · 9 comments
Assignees

Comments

@fiji-flo
Copy link
Contributor

<pre class="brush: css notranslate">{{CSSSyntax}}</pre>

Our syntax highlighting breaks the CSSSyntax macro. It strips the links and explanations. Easiest fix would be fixing the content as this is not highlighted anyhow.

@peterbe
Copy link
Contributor

peterbe commented Feb 17, 2021

So the correct fix is to turn that into:

-<pre class="brush: css notranslate">{{CSSSyntax}}</pre>
+{{CSSSyntax}}

?
Do you have a good URL we can test and confirm against?

@fiji-flo
Copy link
Contributor Author

fiji-flo commented Feb 17, 2021

@peterbe
Copy link
Contributor

peterbe commented Feb 17, 2021

MOZILLA/MDN/content  main ✔
▶ rg CSSSyntax | wc -l
      78

If it's a simple matter of a bunch of search-and-replace (78 to be exact), let's just do that in the mdn/content and never have to think about it :)

@peterbe
Copy link
Contributor

peterbe commented Feb 25, 2021

Note-to-Florian; you can do it to the translated-content repo too now :)

@SebastianZ
Copy link
Contributor

Tried Peter's suggested change locally and it works.

Unfortunately, that also removes the code layout. Therefore it still needs to be wrapped in a <pre> (without the class attribute) to get a proper display.

Sebastian

@SebastianZ
Copy link
Contributor

mdn/content#3163 is meant to fix this issue.

@peterbe There are far more pages affected (exactly 536) because most of them embed the macro using its name in lowercase.

Sebastian

@peterbe
Copy link
Contributor

peterbe commented Mar 15, 2021

@fiji-flo Took care of it. He timed a mass-edit of the content with an edit of the KS macro. So now, the KS macro is responsible for doing its own <pre> tag.

I think we can close this once we're certain it made it to prod as expected.

At the time of writing, it's about 1h until the Prod build builds and also at the time of writing, GitHub is having problems with Actions.

@fiji-flo
Copy link
Contributor Author

#3244 resolves this. Thank you @SebastianZ, weird timing, we fixed it the same day.

@SebastianZ
Copy link
Contributor

SebastianZ commented Mar 16, 2021

#3244 resolves this. Thank you @SebastianZ, weird timing, we fixed it the same day.

Yeah, what a coincidence! But don't worry! It's great this is got fixed now! Thank you!

Sebastian

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

Successfully merging a pull request may close this issue.

3 participants