Replies: 1 comment
-
|
Yes, you are right: @wbamberg identified this problem too. Given that Prism on MDN has an alias feature (syntax-highlighting.js, line 40) we should:
At this point, we have no difference for the readers, no added complexity to Yari (the alias feature already exists), with only minimal changes to our page structure. We can then: cc/ @mdn/core-dev, @wbamberg, @Rumyra, @schalkneethling |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We are considering adopting different toolings on the content repo, for example, Prettier (for formatting) and ESLint (for enforcing some best practices).
I tried locally and got pretty decent results. However, one issue is syntax blocks. ESLint consistently chokes on some blocks, because they are not valid JS:
While we now discourage the use of BNF-style optional parameters, it's hard to make everything valid JS, considering things like ellipsis, placeholders, etc.
Should we use a non-JS language tag for syntax blocks? We can map them back to JS during rendering, so syntax highlighting on the website should not be a problem.
Beta Was this translation helpful? Give feedback.
All reactions