Skip to content

Commit 586b3dd

Browse files
authored
Merge pull request #481 from DenisovichDev/test-1
Fixed inline code rendering issue in `curveVertex`
2 parents 9077e74 + c3d4f39 commit 586b3dd

File tree

2 files changed

+39
-40
lines changed

2 files changed

+39
-40
lines changed

src/content/reference/en/p5/curveVertex.mdx

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -31,28 +31,28 @@ description: >
3131
3232
<a href="/reference/p5/endShape">endShape()</a> in order to draw a curve:</p>
3333
34-
<code>
34+
<pre><code>beginShape();
3535
36-
beginShape();
3736
37+
// Add the first control point.
3838
39-
<p>// Add the first control point.
39+
curveVertex(84, 91);
4040
41-
curveVertex(84, 91);</p>
4241
43-
<p>// Add the anchor points to draw between.
42+
// Add the anchor points to draw between.
4443
4544
curveVertex(68, 19);
4645
47-
curveVertex(21, 17);</p>
46+
curveVertex(21, 17);
4847
49-
<p>// Add the second control point.
48+
49+
// Add the second control point.
5050
51-
curveVertex(32, 91);</p>
51+
curveVertex(32, 91);
5252
53-
<p>endShape();
5453
55-
</p></code>
54+
endShape();
55+
</code></pre>
5656
5757
<p>The code snippet above would only draw the curve between the anchor points,
5858
@@ -63,34 +63,35 @@ description: >
6363
6464
<code>curveVertex()</code> with the coordinates of the control points:</p>
6565
66-
<code>
66+
<pre><code>beginShape();
6767
68-
beginShape();
6968
69+
// Add the first control point and draw a segment to it.
7070
71-
<p>// Add the first control point and draw a segment to it.
71+
curveVertex(84, 91);
7272
7373
curveVertex(84, 91);
7474
75-
curveVertex(84, 91);</p>
7675
77-
<p>// Add the anchor points to draw between.
76+
// Add the anchor points to draw between.
7877
7978
curveVertex(68, 19);
8079
81-
curveVertex(21, 17);</p>
80+
curveVertex(21, 17);
8281
83-
<p>// Add the second control point.
8482
85-
curveVertex(32, 91);</p>
83+
// Add the second control point.
84+
85+
curveVertex(32, 91);
8686
87-
<p>// Uncomment the next line to draw the segment to the second control point.
8887
89-
// curveVertex(32, 91);</p>
88+
// Uncomment the next line to draw the segment to the second control point.
9089
91-
<p>endShape();
90+
// curveVertex(32, 91);
9291
93-
</p></code>
92+
93+
endShape();
94+
</code></pre>
9495
9596
<p>The first two parameters, <code>x</code> and <code>y</code>, set the
9697
vertex’s location. For
@@ -399,3 +400,4 @@ chainable: true
399400

400401

401402
# curveVertex
403+

src/content/reference/en/p5/normal.mdx

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -56,40 +56,37 @@ description: >
5656
5757
again:</p>
5858
59-
<code>
59+
<pre><code>beginShape();
6060
61-
beginShape();
61+
// Set the vertex normal.
6262
63+
normal(-0.4, -0.4, 0.8);
6364
64-
<p>// Set the vertex normal.
65+
// Add a vertex.
6566
66-
normal(-0.4, -0.4, 0.8);</p>
67+
vertex(-30, -30, 0);
6768
68-
<p>// Add a vertex.
69+
// Set the vertex normal.
6970
70-
vertex(-30, -30, 0);</p>
71+
normal(0, 0, 1);
7172
72-
<p>// Set the vertex normal.
73-
74-
normal(0, 0, 1);</p>
75-
76-
<p>// Add vertices.
73+
// Add vertices.
7774
7875
vertex(30, -30, 0);
7976
80-
vertex(30, 30, 0);</p>
77+
vertex(30, 30, 0);
8178
82-
<p>// Set the vertex normal.
79+
// Set the vertex normal.
8380
84-
normal(0.4, -0.4, 0.8);</p>
81+
normal(0.4, -0.4, 0.8);
8582
86-
<p>// Add a vertex.
83+
// Add a vertex.
8784
88-
vertex(-30, 30, 0);</p>
85+
vertex(-30, 30, 0);
8986
90-
<p>endShape();
87+
endShape();
88+
</code></pre>
9189
92-
</p></code>
9390
line: 2066
9491
isConstructor: false
9592
itemtype: method

0 commit comments

Comments
 (0)