-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Description
Most appropriate sub-area of p5.js?
- Accessibility
- Color
- Core/Environment/Rendering
- Data
- DOM
- Events
- Image
- IO
- Math
- Typography
- Utilities
- p5.strands
- WebGL
- DevOps, Build process, Unit testing
- Internationalization (i18n)
- Friendly Errors
- Other (specify if possible)
p5.js version
1.x and 2.x
Web browser and version
All
Operating system
All
Steps to reproduce this
On both https://beta.p5js.org/reference/p5/texturemode/ and https://p5js.org/reference/p5/texturemode/, the code blocks are rendering without correct formatting and with HTML mixed in:

It looks like this is because the code blocks are in a <code>
tag in the docs:
Lines 2413 to 2419 in 2606c21
* <code> | |
* // Apply the image as a texture. | |
* texture(img); | |
* | |
* // Draw the rectangle. | |
* rect(0, 0, 30, 50); | |
* </code> |
...when they should be in three-backtick code fences, e.g. in the keyIsDown
docs:
Lines 825 to 835 in 2606c21
* `keyIsDown()` is helpful when checking for multiple different key presses. | |
* For example, `keyIsDown()` can be used to check if both `LEFT_ARROW` and | |
* `UP_ARROW` are pressed: | |
* | |
* ```js | |
* if (keyIsDown(LEFT_ARROW) && keyIsDown(UP_ARROW)) { | |
* // Move diagonally. | |
* } | |
* ``` | |
* | |
* `keyIsDown()` can check for key presses using strings based on |