processing / p5.js-website

New p5.js website!
http://p5js.org
MIT License
19 stars 89 forks source link

Code in reference not appearing correctly #405

Closed davepagurek closed 5 months ago

davepagurek commented 5 months ago

In the reference, it looks like we have some code blocks just placed within <code>, e.g. this bit in the orbitControl reference:

 * The fourth parameter, `options`, is also optional. It’s an object that
 * changes the behavior of orbiting. For example, calling
 * `orbitControl(1, 1, 1, options)` keeps the default sensitivity values while
 * changing the behaviors set with `options`. The object can have the
 * following properties:
 *
 * <code>
 * let options = {
 *   // Setting this to false makes mobile interactions smoother by
 *   // preventing accidental interactions with the page while orbiting.
 *   // By default, it's true.
 *   disableTouchActions: true,
 *
 *   // Setting this to true makes the camera always rotate in the
 *   // direction the mouse/touch is moving.
 *   // By default, it's false.
 *   freeRotation: false
 * };
 *
 * orbitControl(1, 1, 1, options);
 * </code>

This gets incorrectly rendered as inline code, with some <p>s in there too:

image

davepagurek commented 5 months ago

hmm this is actually broken in the live p5.js site too: image

davepagurek commented 5 months ago

Oh this is fixed in https://github.com/processing/p5.js/pull/7089. I guess we aren't going to immediately fix this in a new release, so maybe for now I'll manually update the references in this repo

Qianqianye commented 5 months ago

Adding @nickmcintyre to this discussion.