Skip to content

Commit 147e885

Browse files
authored
Merge pull request #8661 from processing/unescape
Unescape < and > in inline code in docs
2 parents 4706c3c + 5cffb3f commit 147e885

File tree

7 files changed

+44
-44
lines changed

7 files changed

+44
-44
lines changed

src/core/p5.Graphics.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ class Graphics {
240240
* Removes the graphics buffer from the web page.
241241
*
242242
* Calling `myGraphics.remove()` removes the graphics buffer's
243-
* `&lt;canvas&gt;` element from the web page. The graphics buffer also uses
243+
* `<canvas>` element from the web page. The graphics buffer also uses
244244
* a bit of memory on the CPU that can be freed like so:
245245
*
246246
* ```js
@@ -597,7 +597,7 @@ function graphics(p5, fn){
597597
* @param {Number} h height height of the graphics buffer in pixels.
598598
* @param {(P2D|WEBGL|P2DHDR)} renderer the renderer to use, either P2D or WEBGL.
599599
* @param {p5} [pInst] sketch instance.
600-
* @param {HTMLCanvasElement} [canvas] existing `&lt;canvas&gt;` element to use.
600+
* @param {HTMLCanvasElement} [canvas] existing `<canvas>` element to use.
601601
*
602602
* @example
603603
* let pg;

src/core/rendering.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -607,9 +607,9 @@ function rendering(p5, fn){
607607

608608
/**
609609
* A system variable that provides direct access to the sketch's
610-
* `&lt;canvas&gt;` element.
610+
* `<canvas>` element.
611611
*
612-
* The `&lt;canvas&gt;` element provides many specialized features that aren't
612+
* The `<canvas>` element provides many specialized features that aren't
613613
* included in the p5.js library. The `drawingContext` system variable
614614
* provides access to these features by exposing the sketch's
615615
* <a href="https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D">CanvasRenderingContext2D</a>

src/dom/dom.js

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -371,16 +371,16 @@ function dom(p5, fn){
371371
}
372372

373373
/**
374-
* Creates a `&lt;div&gt;&lt;/div&gt;` element.
374+
* Creates a `<div></div>` element.
375375
*
376-
* `&lt;div&gt;&lt;/div&gt;` elements are commonly used as containers for
376+
* `<div></div>` elements are commonly used as containers for
377377
* other elements.
378378
*
379379
* The parameter `html` is optional. It accepts a string that sets the
380-
* inner HTML of the new `&lt;div&gt;&lt;/div&gt;`.
380+
* inner HTML of the new `<div></div>`.
381381
*
382382
* @method createDiv
383-
* @param {String} [html] inner HTML for the new `&lt;div&gt;&lt;/div&gt;` element.
383+
* @param {String} [html] inner HTML for the new `<div></div>` element.
384384
* @return {p5.Element} new <a href="#/p5.Element">p5.Element</a> object.
385385
*
386386
* @example
@@ -418,13 +418,13 @@ function dom(p5, fn){
418418
/**
419419
* Creates a paragraph element.
420420
*
421-
* `&lt;p&gt;&lt;/p&gt;` elements are commonly used for paragraph-length text.
421+
* `<p></p>` elements are commonly used for paragraph-length text.
422422
*
423423
* The parameter `html` is optional. It accepts a string that sets the
424-
* inner HTML of the new `&lt;p&gt;&lt;/p&gt;`.
424+
* inner HTML of the new `<p></p>`.
425425
*
426426
* @method createP
427-
* @param {String} [html] inner HTML for the new `&lt;p&gt;&lt;/p&gt;` element.
427+
* @param {String} [html] inner HTML for the new `<p></p>` element.
428428
* @return {p5.Element} new <a href="#/p5.Element">p5.Element</a> object.
429429
*
430430
* @example
@@ -447,18 +447,18 @@ function dom(p5, fn){
447447
};
448448

449449
/**
450-
* Creates a `&lt;span&gt;&lt;/span&gt;` element.
450+
* Creates a `<span></span>` element.
451451
*
452-
* `&lt;span&gt;&lt;/span&gt;` elements are commonly used as containers
453-
* for inline elements. For example, a `&lt;span&gt;&lt;/span&gt;`
452+
* `<span></span>` elements are commonly used as containers
453+
* for inline elements. For example, a `<span></span>`
454454
* can hold part of a sentence that's a
455455
* <span style="color: deeppink;">different</span> style.
456456
*
457457
* The parameter `html` is optional. It accepts a string that sets the
458-
* inner HTML of the new `&lt;span&gt;&lt;/span&gt;`.
458+
* inner HTML of the new `<span></span>`.
459459
*
460460
* @method createSpan
461-
* @param {String} [html] inner HTML for the new `&lt;span&gt;&lt;/span&gt;` element.
461+
* @param {String} [html] inner HTML for the new `<span></span>` element.
462462
* @return {p5.Element} new <a href="#/p5.Element">p5.Element</a> object.
463463
*
464464
* @example
@@ -511,7 +511,7 @@ function dom(p5, fn){
511511
};
512512

513513
/**
514-
* Creates an `&lt;img&gt;` element that can appear outside of the canvas.
514+
* Creates an `<img>` element that can appear outside of the canvas.
515515
*
516516
* The first parameter, `src`, is a string with the path to the image file.
517517
* `src` should be a relative path, as in `'assets/image.png'`, or a URL, as
@@ -582,7 +582,7 @@ function dom(p5, fn){
582582
};
583583

584584
/**
585-
* Creates an `&lt;a&gt;&lt;/a&gt;` element that links to another web page.
585+
* Creates an `<a></a>` element that links to another web page.
586586
*
587587
* The first parmeter, `href`, is a string that sets the URL of the linked
588588
* page.
@@ -639,7 +639,7 @@ function dom(p5, fn){
639639

640640
/* INPUT */
641641
/**
642-
* Creates a slider `&lt;input&gt;&lt;/input&gt;` element.
642+
* Creates a slider `<input></input>` element.
643643
*
644644
* Range sliders are useful for quickly selecting numbers from a given range.
645645
*
@@ -761,7 +761,7 @@ function dom(p5, fn){
761761
};
762762

763763
/**
764-
* Creates a `&lt;button&gt;&lt;/button&gt;` element.
764+
* Creates a `<button></button>` element.
765765
*
766766
* The first parameter, `label`, is a string that sets the label displayed on
767767
* the button.
@@ -838,7 +838,7 @@ function dom(p5, fn){
838838
};
839839

840840
/**
841-
* Creates a checkbox `&lt;input&gt;&lt;/input&gt;` element.
841+
* Creates a checkbox `<input></input>` element.
842842
*
843843
* Checkboxes extend the <a href="#/p5.Element">p5.Element</a> class with a
844844
* `checked()` method. Calling `myBox.checked()` returns `true` if it the box
@@ -979,11 +979,11 @@ function dom(p5, fn){
979979
};
980980

981981
/**
982-
* Creates a dropdown menu `&lt;select&gt;&lt;/select&gt;` element.
982+
* Creates a dropdown menu `<select></select>` element.
983983
*
984984
* The parameter is optional. If `true` is passed, as in
985985
* `let mySelect = createSelect(true)`, then the dropdown will support
986-
* multiple selections. If an existing `&lt;select&gt;&lt;/select&gt;` element
986+
* multiple selections. If an existing `<select></select>` element
987987
* is passed, as in `let mySelect = createSelect(otherSelect)`, the existing
988988
* element will be wrapped in a new <a href="#/p5.Element">p5.Element</a>
989989
* object.
@@ -1250,8 +1250,8 @@ function dom(p5, fn){
12501250
*
12511251
* The parameter is optional. If a string is passed, as in
12521252
* `let myRadio = createSelect('food')`, then each radio option will
1253-
* have `"food"` as its `name` parameter: `&lt;input name="food"&gt;&lt;/input&gt;`.
1254-
* If an existing `&lt;div&gt;&lt;/div&gt;` or `&lt;span&gt;&lt;/span&gt;`
1253+
* have `"food"` as its `name` parameter: `<input name="food"></input>`.
1254+
* If an existing `<div></div>` or `<span></span>`
12551255
* element is passed, as in `let myRadio = createSelect(container)`, it will
12561256
* become the radio button's parent element.
12571257
*
@@ -1264,8 +1264,8 @@ function dom(p5, fn){
12641264
* - `myRadio.disable(shouldDisable)` enables the entire radio button if `true` is passed and disables it if `false` is passed.
12651265
*
12661266
* @method createRadio
1267-
* @param {Object} [containerElement] container HTML Element, either a `&lt;div&gt;&lt;/div&gt;`
1268-
* or `&lt;span&gt;&lt;/span&gt;`.
1267+
* @param {Object} [containerElement] container HTML Element, either a `<div></div>`
1268+
* or `<span></span>`.
12691269
* @return {p5.Element} new <a href="#/p5.Element">p5.Element</a> object.
12701270
*
12711271
* @example
@@ -1384,7 +1384,7 @@ function dom(p5, fn){
13841384
*/
13851385
/**
13861386
* @method createRadio
1387-
* @param {String} [name] name parameter assigned to each option's `&lt;input&gt;&lt;/input&gt;` element.
1387+
* @param {String} [name] name parameter assigned to each option's `<input></input>` element.
13881388
* @return {p5.Element} new <a href="#/p5.Element">p5.Element</a> object.
13891389
*/
13901390
/**
@@ -1651,7 +1651,7 @@ function dom(p5, fn){
16511651
};
16521652

16531653
/**
1654-
* Creates a text `&lt;input&gt;&lt;/input&gt;` element.
1654+
* Creates a text `<input></input>` element.
16551655
*
16561656
* Call `myInput.size()` to set the length of the text box.
16571657
*
@@ -1727,7 +1727,7 @@ function dom(p5, fn){
17271727
};
17281728

17291729
/**
1730-
* Creates an `&lt;input&gt;&lt;/input&gt;` element of type `'file'`.
1730+
* Creates an `<input></input>` element of type `'file'`.
17311731
*
17321732
* `createFileInput()` allows users to select local files for use in a sketch.
17331733
* It returns a <a href="#/p5.File">p5.File</a> object.

src/dom/p5.Element.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ class Element {
9292
/**
9393
* Attaches the element to a parent element.
9494
*
95-
* For example, a `&lt;div&gt;&lt;/div&gt;` element may be used as a box to
95+
* For example, a `<div></div>` element may be used as a box to
9696
* hold two pieces of text, a header and a paragraph. The
97-
* `&lt;div&gt;&lt;/div&gt;` is the parent element of both the header and
97+
* `<div></div>` is the parent element of both the header and
9898
* paragraph.
9999
*
100100
* The parameter `parent` can have one of three types. `parent` can be a

src/dom/p5.MediaElement.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,7 +1319,7 @@ function media(p5, fn){
13191319
}
13201320

13211321
/**
1322-
* Creates a `&lt;video&gt;` element for simple audio/video playback.
1322+
* Creates a `<video>` element for simple audio/video playback.
13231323
*
13241324
* `createVideo()` returns a new
13251325
* <a href="#/p5.MediaElement">p5.MediaElement</a> object. Videos are shown by
@@ -1407,7 +1407,7 @@ function media(p5, fn){
14071407
/* AUDIO STUFF */
14081408

14091409
/**
1410-
* Creates a hidden `&lt;audio&gt;` element for simple audio playback.
1410+
* Creates a hidden `<audio>` element for simple audio playback.
14111411
*
14121412
* `createAudio()` returns a new
14131413
* <a href="#/p5.MediaElement">p5.MediaElement</a> object.
@@ -1484,7 +1484,7 @@ function media(p5, fn){
14841484
}
14851485

14861486
/**
1487-
* Creates a `&lt;video&gt;` element that "captures" the audio/video stream from
1487+
* Creates a `<video>` element that "captures" the audio/video stream from
14881488
* the webcam and microphone.
14891489
*
14901490
* `createCapture()` returns a new

src/io/files.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ function files(p5, fn){
547547
* (<a href="https://developer.mozilla.org/en-US/docs/Web/XML/XML_introduction" target="_blank">XML</a>)
548548
* is a standard format for sending data between applications. Like HTML, the
549549
* XML format is based on tags and attributes, as in
550-
* `&lt;time units="s"&gt;1234&lt;/time&gt;`.
550+
* `<time units="s">1234</time>`.
551551
*
552552
* The first parameter, `path`, is always a string with the path to the file.
553553
* Paths to local files should be relative, as in

src/io/p5.XML.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class XML {
6262
* Returns the element's name as a `String`.
6363
*
6464
* An XML element's name is given by its tag. For example, the element
65-
* `&lt;language&gt;JavaScript&lt;/language&gt;` has the name `language`.
65+
* `<language>JavaScript</language>` has the name `language`.
6666
*
6767
* @return {String} name of the element.
6868
*
@@ -105,11 +105,11 @@ class XML {
105105
* Sets the element's tag name.
106106
*
107107
* An XML element's name is given by its tag. For example, the element
108-
* `&lt;language&gt;JavaScript&lt;/language&gt;` has the name `language`.
108+
* `<language>JavaScript</language>` has the name `language`.
109109
*
110110
* The parameter, `name`, is the element's new name as a string. For example,
111111
* calling `myXML.setName('planet')` will make the element's new tag name
112-
* `&lt;planet&gt;&lt;/planet&gt;`.
112+
* `<planet></planet>`.
113113
*
114114
* @param {String} name new tag name of the element.
115115
*
@@ -251,7 +251,7 @@ class XML {
251251
*
252252
* The parameter, `name`, is optional. If a string is passed, as in
253253
* `myXML.getChildren('cat')`, then the method will only return child elements
254-
* with the tag `&lt;cat&gt;`.
254+
* with the tag `<cat>`.
255255
*
256256
* @param {String} [name] name of the elements to return.
257257
* @return {p5.XML[]} child elements.
@@ -345,7 +345,7 @@ class XML {
345345
*
346346
* The parameter, `name`, is optional. If a string is passed, as in
347347
* `myXML.getChild('cat')`, then the first child element with the tag
348-
* `&lt;cat&gt;` will be returned. If a number is passed, as in
348+
* `<cat>` will be returned. If a number is passed, as in
349349
* `myXML.getChild(1)`, then the child element at that index will be returned.
350350
*
351351
* @param {String|Integer} name element name or index.
@@ -480,7 +480,7 @@ class XML {
480480
*
481481
* The parameter, `name`, is the child element to remove. If a string is
482482
* passed, as in `myXML.removeChild('cat')`, then the first child element
483-
* with the tag `&lt;cat&gt;` will be removed. If a number is passed, as in
483+
* with the tag `<cat>` will be removed. If a number is passed, as in
484484
* `myXML.removeChild(1)`, then the child element at that index will be
485485
* removed.
486486
*
@@ -1034,7 +1034,7 @@ class XML {
10341034
* Sets the element's content.
10351035
*
10361036
* An element's content is the text between its tags. For example, the element
1037-
* `&lt;language&gt;JavaScript&lt;/language&gt;` has the content `JavaScript`.
1037+
* `<language>JavaScript</language>` has the content `JavaScript`.
10381038
*
10391039
* The parameter, `content`, is a string with the element's new content.
10401040
*
@@ -1152,7 +1152,7 @@ function xml(p5, fn){
11521152
* (<a href="https://developer.mozilla.org/en-US/docs/Web/XML/XML_introduction" target="_blank">XML</a>)
11531153
* is a standard format for sending data between applications. Like HTML, the
11541154
* XML format is based on tags and attributes, as in
1155-
* `&lt;time units="s"&gt;1234&lt;/time&gt;`.
1155+
* `<time units="s">1234</time>`.
11561156
*
11571157
* Note: Use <a href="#/p5/loadXML">loadXML()</a> to load external XML files.
11581158
*

0 commit comments

Comments
 (0)