@@ -68,14 +68,14 @@ func TestRender_StandardLinks(t *testing.T) {
68
68
assert .Equal (t , strings .TrimSpace (expectedWiki ), strings .TrimSpace (buffer ))
69
69
}
70
70
71
- googleRendered := `<p dir="auto" ><a href="https://google.com/" rel="nofollow">https://google.com/</a></p>`
71
+ googleRendered := `<p><a href="https://google.com/" rel="nofollow">https://google.com/</a></p>`
72
72
test ("<https://google.com/>" , googleRendered , googleRendered )
73
73
74
74
lnk := util .URLJoin (AppSubURL , "WikiPage" )
75
75
lnkWiki := util .URLJoin (AppSubURL , "wiki" , "WikiPage" )
76
76
test ("[WikiPage](WikiPage)" ,
77
- `<p dir="auto" ><a href="` + lnk + `" rel="nofollow">WikiPage</a></p>` ,
78
- `<p dir="auto" ><a href="` + lnkWiki + `" rel="nofollow">WikiPage</a></p>` )
77
+ `<p><a href="` + lnk + `" rel="nofollow">WikiPage</a></p>` ,
78
+ `<p><a href="` + lnkWiki + `" rel="nofollow">WikiPage</a></p>` )
79
79
}
80
80
81
81
func TestRender_Images (t * testing.T ) {
@@ -99,49 +99,49 @@ func TestRender_Images(t *testing.T) {
99
99
100
100
test (
101
101
"" ,
102
- `<p dir="auto" ><a href="` + result + `" target="_blank" rel="nofollow noopener"><img src="` + result + `" alt="` + title + `"/></a></p>` )
102
+ `<p><a href="` + result + `" target="_blank" rel="nofollow noopener"><img src="` + result + `" alt="` + title + `"/></a></p>` )
103
103
104
104
test (
105
105
"[[" + title + "|" + url + "]]" ,
106
- `<p dir="auto" ><a href="` + result + `" rel="nofollow"><img src="` + result + `" title="` + title + `" alt="` + title + `"/></a></p>` )
106
+ `<p><a href="` + result + `" rel="nofollow"><img src="` + result + `" title="` + title + `" alt="` + title + `"/></a></p>` )
107
107
test (
108
108
"[](" + href + ")" ,
109
- `<p dir="auto" ><a href="` + href + `" rel="nofollow"><img src="` + result + `" alt="` + title + `"/></a></p>` )
109
+ `<p><a href="` + href + `" rel="nofollow"><img src="` + result + `" alt="` + title + `"/></a></p>` )
110
110
111
111
url = "/../../.images/src/02/train.jpg"
112
112
test (
113
113
"" ,
114
- `<p dir="auto" ><a href="` + result + `" target="_blank" rel="nofollow noopener"><img src="` + result + `" alt="` + title + `"/></a></p>` )
114
+ `<p><a href="` + result + `" target="_blank" rel="nofollow noopener"><img src="` + result + `" alt="` + title + `"/></a></p>` )
115
115
116
116
test (
117
117
"[[" + title + "|" + url + "]]" ,
118
- `<p dir="auto" ><a href="` + result + `" rel="nofollow"><img src="` + result + `" title="` + title + `" alt="` + title + `"/></a></p>` )
118
+ `<p><a href="` + result + `" rel="nofollow"><img src="` + result + `" title="` + title + `" alt="` + title + `"/></a></p>` )
119
119
test (
120
120
"[](" + href + ")" ,
121
- `<p dir="auto" ><a href="` + href + `" rel="nofollow"><img src="` + result + `" alt="` + title + `"/></a></p>` )
121
+ `<p><a href="` + href + `" rel="nofollow"><img src="` + result + `" alt="` + title + `"/></a></p>` )
122
122
}
123
123
124
124
func testAnswers (baseURLContent , baseURLImages string ) []string {
125
125
return []string {
126
- `<p dir="auto" >Wiki! Enjoy :)</p>
127
- <ul dir="auto" >
126
+ `<p>Wiki! Enjoy :)</p>
127
+ <ul>
128
128
<li><a href="` + baseURLContent + `/Links" rel="nofollow">Links, Language bindings, Engine bindings</a></li>
129
129
<li><a href="` + baseURLContent + `/Tips" rel="nofollow">Tips</a></li>
130
130
</ul>
131
- <p dir="auto" >See commit <a href="http://localhost:3000/gogits/gogs/commit/65f1bf27bc" rel="nofollow"><code>65f1bf27bc</code></a></p>
132
- <p dir="auto" >Ideas and codes</p>
133
- <ul dir="auto" >
131
+ <p>See commit <a href="http://localhost:3000/gogits/gogs/commit/65f1bf27bc" rel="nofollow"><code>65f1bf27bc</code></a></p>
132
+ <p>Ideas and codes</p>
133
+ <ul>
134
134
<li>Bezier widget (by <a href="` + AppURL + `r-lyeh" rel="nofollow">@r-lyeh</a>) <a href="http://localhost:3000/ocornut/imgui/issues/786" class="ref-issue" rel="nofollow">ocornut/imgui#786</a></li>
135
135
<li>Bezier widget (by <a href="` + AppURL + `r-lyeh" rel="nofollow">@r-lyeh</a>) <a href="http://localhost:3000/gogits/gogs/issues/786" class="ref-issue" rel="nofollow">#786</a></li>
136
136
<li>Node graph editors <a href="https://github.com/ocornut/imgui/issues/306" rel="nofollow">https://github.com/ocornut/imgui/issues/306</a></li>
137
137
<li><a href="` + baseURLContent + `/memory_editor_example" rel="nofollow">Memory Editor</a></li>
138
138
<li><a href="` + baseURLContent + `/plot_var_example" rel="nofollow">Plot var helper</a></li>
139
139
</ul>
140
140
` ,
141
- `<h2 id="user-content-what-is-wine-staging" dir="auto" >What is Wine Staging?</h2>
142
- <p dir="auto" ><strong>Wine Staging</strong> on website <a href="http://wine-staging.com" rel="nofollow">wine-staging.com</a>.</p>
143
- <h2 id="user-content-quick-links" dir="auto" >Quick Links</h2>
144
- <p dir="auto" >Here are some links to the most important topics. You can find the full list of pages at the sidebar.</p>
141
+ `<h2 id="user-content-what-is-wine-staging">What is Wine Staging?</h2>
142
+ <p><strong>Wine Staging</strong> on website <a href="http://wine-staging.com" rel="nofollow">wine-staging.com</a>.</p>
143
+ <h2 id="user-content-quick-links">Quick Links</h2>
144
+ <p>Here are some links to the most important topics. You can find the full list of pages at the sidebar.</p>
145
145
<table>
146
146
<thead>
147
147
<tr>
@@ -157,50 +157,50 @@ func testAnswers(baseURLContent, baseURLImages string) []string {
157
157
</tbody>
158
158
</table>
159
159
` ,
160
- `<p dir="auto" ><a href="http://www.excelsiorjet.com/" rel="nofollow">Excelsior JET</a> allows you to create native executables for Windows, Linux and Mac OS X.</p>
161
- <ol dir="auto" >
160
+ `<p><a href="http://www.excelsiorjet.com/" rel="nofollow">Excelsior JET</a> allows you to create native executables for Windows, Linux and Mac OS X.</p>
161
+ <ol>
162
162
<li><a href="https://github.com/libgdx/libgdx/wiki/Gradle-on-the-Commandline#packaging-for-the-desktop" rel="nofollow">Package your libGDX application</a><br/>
163
163
<a href="` + baseURLImages + `/images/1.png" rel="nofollow"><img src="` + baseURLImages + `/images/1.png" title="1.png" alt="images/1.png"/></a></li>
164
164
<li>Perform a test run by hitting the Run! button.<br/>
165
165
<a href="` + baseURLImages + `/images/2.png" rel="nofollow"><img src="` + baseURLImages + `/images/2.png" title="2.png" alt="images/2.png"/></a></li>
166
166
</ol>
167
- <h2 id="user-content-custom-id" dir="auto" >More tests</h2>
168
- <p dir="auto" >(from <a href="https://www.markdownguide.org/extended-syntax/" rel="nofollow">https://www.markdownguide.org/extended-syntax/</a>)</p>
169
- <h3 id="user-content-checkboxes" dir="auto" >Checkboxes</h3>
170
- <ul dir="auto" >
167
+ <h2 id="user-content-custom-id">More tests</h2>
168
+ <p>(from <a href="https://www.markdownguide.org/extended-syntax/" rel="nofollow">https://www.markdownguide.org/extended-syntax/</a>)</p>
169
+ <h3 id="user-content-checkboxes">Checkboxes</h3>
170
+ <ul>
171
171
<li class="task-list-item"><input type="checkbox" disabled="" data-source-position="434"/>unchecked</li>
172
172
<li class="task-list-item"><input type="checkbox" disabled="" data-source-position="450" checked=""/>checked</li>
173
173
<li class="task-list-item"><input type="checkbox" disabled="" data-source-position="464"/>still unchecked</li>
174
174
</ul>
175
- <h3 id="user-content-definition-list" dir="auto" >Definition list</h3>
175
+ <h3 id="user-content-definition-list">Definition list</h3>
176
176
<dl>
177
177
<dt>First Term</dt>
178
178
<dd>This is the definition of the first term.</dd>
179
179
<dt>Second Term</dt>
180
180
<dd>This is one definition of the second term.</dd>
181
181
<dd>This is another definition of the second term.</dd>
182
182
</dl>
183
- <h3 id="user-content-footnotes" dir="auto" >Footnotes</h3>
184
- <p dir="auto" >Here is a simple footnote,<sup id="fnref:user-content-1"><a href="#fn:user-content-1" rel="nofollow">1</a></sup> and here is a longer one.<sup id="fnref:user-content-bignote"><a href="#fn:user-content-bignote" rel="nofollow">2</a></sup></p>
183
+ <h3 id="user-content-footnotes">Footnotes</h3>
184
+ <p>Here is a simple footnote,<sup id="fnref:user-content-1"><a href="#fn:user-content-1" rel="nofollow">1</a></sup> and here is a longer one.<sup id="fnref:user-content-bignote"><a href="#fn:user-content-bignote" rel="nofollow">2</a></sup></p>
185
185
<div>
186
186
<hr/>
187
- <ol dir="auto" >
187
+ <ol>
188
188
<li id="fn:user-content-1">
189
- <p dir="auto" >This is the first footnote. <a href="#fnref:user-content-1" rel="nofollow">↩︎</a></p>
189
+ <p>This is the first footnote. <a href="#fnref:user-content-1" rel="nofollow">↩︎</a></p>
190
190
</li>
191
191
<li id="fn:user-content-bignote">
192
- <p dir="auto" >Here is one with multiple paragraphs and code.</p>
193
- <p dir="auto" >Indent paragraphs to include them in the footnote.</p>
194
- <p dir="auto" ><code>{ my code }</code></p>
195
- <p dir="auto" >Add as many paragraphs as you like. <a href="#fnref:user-content-bignote" rel="nofollow">↩︎</a></p>
192
+ <p>Here is one with multiple paragraphs and code.</p>
193
+ <p>Indent paragraphs to include them in the footnote.</p>
194
+ <p><code>{ my code }</code></p>
195
+ <p>Add as many paragraphs as you like. <a href="#fnref:user-content-bignote" rel="nofollow">↩︎</a></p>
196
196
</li>
197
197
</ol>
198
198
</div>
199
- ` , `<ul dir="auto" >
199
+ ` , `<ul>
200
200
<li class="task-list-item"><input type="checkbox" disabled="" data-source-position="3"/> If you want to rebase/retry this PR, click this checkbox.</li>
201
201
</ul>
202
202
<hr/>
203
- <p dir="auto" >This PR has been generated by <a href="https://github.com/renovatebot/renovate" rel="nofollow">Renovate Bot</a>.</p>
203
+ <p>This PR has been generated by <a href="https://github.com/renovatebot/renovate" rel="nofollow">Renovate Bot</a>.</p>
204
204
` ,
205
205
}
206
206
}
@@ -304,12 +304,12 @@ func TestTotal_RenderWiki(t *testing.T) {
304
304
// Guard wiki sidebar: special syntax
305
305
`[[Guardfile-DSL / Configuring-Guard|Guardfile-DSL---Configuring-Guard]]` ,
306
306
// rendered
307
- `<p dir="auto" ><a href="` + AppSubURL + `wiki/Guardfile-DSL---Configuring-Guard" rel="nofollow">Guardfile-DSL / Configuring-Guard</a></p>
307
+ `<p><a href="` + AppSubURL + `wiki/Guardfile-DSL---Configuring-Guard" rel="nofollow">Guardfile-DSL / Configuring-Guard</a></p>
308
308
` ,
309
309
// special syntax
310
310
`[[Name|Link]]` ,
311
311
// rendered
312
- `<p dir="auto" ><a href="` + AppSubURL + `wiki/Link" rel="nofollow">Name</a></p>
312
+ `<p><a href="` + AppSubURL + `wiki/Link" rel="nofollow">Name</a></p>
313
313
` ,
314
314
}
315
315
@@ -401,7 +401,7 @@ func TestRenderSiblingImages_Issue12925(t *testing.T) {
401
401
testcase := `
402
402

403
403
`
404
- expected := `<p dir="auto" ><a href="/image1" target="_blank" rel="nofollow noopener"><img src="/image1" alt="image1"></a><br>
404
+ expected := `<p><a href="/image1" target="_blank" rel="nofollow noopener"><img src="/image1" alt="image1"></a><br>
405
405
<a href="/image2" target="_blank" rel="nofollow noopener"><img src="/image2" alt="image2"></a></p>
406
406
`
407
407
res , err := RenderRawString (& markup.RenderContext {Ctx : git .DefaultContext }, testcase )
@@ -411,7 +411,7 @@ func TestRenderSiblingImages_Issue12925(t *testing.T) {
411
411
412
412
func TestRenderEmojiInLinks_Issue12331 (t * testing.T ) {
413
413
testcase := `[Link with emoji :moon: in text](https://gitea.io)`
414
- expected := `<p dir="auto" ><a href="https://gitea.io" rel="nofollow">Link with emoji <span class="emoji" aria-label="waxing gibbous moon">🌔</span> in text</a></p>
414
+ expected := `<p><a href="https://gitea.io" rel="nofollow">Link with emoji <span class="emoji" aria-label="waxing gibbous moon">🌔</span> in text</a></p>
415
415
`
416
416
res , err := RenderString (& markup.RenderContext {Ctx : git .DefaultContext }, testcase )
417
417
assert .NoError (t , err )
@@ -426,23 +426,23 @@ func TestColorPreview(t *testing.T) {
426
426
}{
427
427
{ // hex
428
428
"`#FF0000`" ,
429
- `<p dir="auto" ><code>#FF0000<span class="color-preview" style="background-color: #FF0000"></span></code></p>` + nl ,
429
+ `<p><code>#FF0000<span class="color-preview" style="background-color: #FF0000"></span></code></p>` + nl ,
430
430
},
431
431
{ // rgb
432
432
"`rgb(16, 32, 64)`" ,
433
- `<p dir="auto" ><code>rgb(16, 32, 64)<span class="color-preview" style="background-color: rgb(16, 32, 64)"></span></code></p>` + nl ,
433
+ `<p><code>rgb(16, 32, 64)<span class="color-preview" style="background-color: rgb(16, 32, 64)"></span></code></p>` + nl ,
434
434
},
435
435
{ // short hex
436
436
"This is the color white `#000`" ,
437
- `<p dir="auto" >This is the color white <code>#000<span class="color-preview" style="background-color: #000"></span></code></p>` + nl ,
437
+ `<p>This is the color white <code>#000<span class="color-preview" style="background-color: #000"></span></code></p>` + nl ,
438
438
},
439
439
{ // hsl
440
440
"HSL stands for hue, saturation, and lightness. An example: `hsl(0, 100%, 50%)`." ,
441
- `<p dir="auto" >HSL stands for hue, saturation, and lightness. An example: <code>hsl(0, 100%, 50%)<span class="color-preview" style="background-color: hsl(0, 100%, 50%)"></span></code>.</p>` + nl ,
441
+ `<p>HSL stands for hue, saturation, and lightness. An example: <code>hsl(0, 100%, 50%)<span class="color-preview" style="background-color: hsl(0, 100%, 50%)"></span></code>.</p>` + nl ,
442
442
},
443
443
{ // uppercase hsl
444
444
"HSL stands for hue, saturation, and lightness. An example: `HSL(0, 100%, 50%)`." ,
445
- `<p dir="auto" >HSL stands for hue, saturation, and lightness. An example: <code>HSL(0, 100%, 50%)<span class="color-preview" style="background-color: HSL(0, 100%, 50%)"></span></code>.</p>` + nl ,
445
+ `<p>HSL stands for hue, saturation, and lightness. An example: <code>HSL(0, 100%, 50%)<span class="color-preview" style="background-color: HSL(0, 100%, 50%)"></span></code>.</p>` + nl ,
446
446
},
447
447
}
448
448
@@ -481,31 +481,31 @@ func TestMathBlock(t *testing.T) {
481
481
}{
482
482
{
483
483
"$a$" ,
484
- `<p dir="auto" ><code class="language-math is-loading">a</code></p>` + nl ,
484
+ `<p><code class="language-math is-loading">a</code></p>` + nl ,
485
485
},
486
486
{
487
487
"$ a $" ,
488
- `<p dir="auto" ><code class="language-math is-loading">a</code></p>` + nl ,
488
+ `<p><code class="language-math is-loading">a</code></p>` + nl ,
489
489
},
490
490
{
491
491
"$a$ $b$" ,
492
- `<p dir="auto" ><code class="language-math is-loading">a</code> <code class="language-math is-loading">b</code></p>` + nl ,
492
+ `<p><code class="language-math is-loading">a</code> <code class="language-math is-loading">b</code></p>` + nl ,
493
493
},
494
494
{
495
495
`\(a\) \(b\)` ,
496
- `<p dir="auto" ><code class="language-math is-loading">a</code> <code class="language-math is-loading">b</code></p>` + nl ,
496
+ `<p><code class="language-math is-loading">a</code> <code class="language-math is-loading">b</code></p>` + nl ,
497
497
},
498
498
{
499
499
`$a a$b b$` ,
500
- `<p dir="auto" ><code class="language-math is-loading">a a$b b</code></p>` + nl ,
500
+ `<p><code class="language-math is-loading">a a$b b</code></p>` + nl ,
501
501
},
502
502
{
503
503
`a a$b b` ,
504
- `<p dir="auto" >a a$b b</p>` + nl ,
504
+ `<p>a a$b b</p>` + nl ,
505
505
},
506
506
{
507
507
`a$b $a a$b b$` ,
508
- `<p dir="auto" >a$b <code class="language-math is-loading">a a$b b</code></p>` + nl ,
508
+ `<p>a$b <code class="language-math is-loading">a a$b b</code></p>` + nl ,
509
509
},
510
510
{
511
511
"$$a$$" ,
0 commit comments