Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
present: test Markdown & fix splitting of pre blocks
Consider this input: This is preformatted: line 1 line 2 line 3 after blank line Before, this would split into two different <pre> sections in Markdown mode. Now it matches legacy mode and doesn't. Fixes golang/go#37972. Change-Id: I6bf156c76ef9c63b6c3ffe6cce431d9589def867 Reviewed-on: https://go-review.googlesource.com/c/tools/+/224958 Reviewed-by: Andrew Bonventre <andybons@golang.org>
- Loading branch information
Showing
6 changed files
with
209 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Title | ||
Subtitle | ||
|
||
Name | ||
|
||
## Heading | ||
|
||
Text | ||
on two lines. | ||
|
||
More text. | ||
|
||
--- | ||
<h1>Title</h1> | ||
<h2>Subtitle</h2> | ||
<author> | ||
<p>Name</p> | ||
</author> | ||
<section> | ||
<h2 id="TOC_1.">Heading</h2> | ||
<p>Text | ||
on two lines.</p> | ||
<p>More text.</p> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Code | ||
|
||
## | ||
|
||
Code: | ||
|
||
.code testdata/code.txt | ||
|
||
Snippet: | ||
|
||
.code testdata/code.txt /Snippet/ | ||
|
||
Highlight: | ||
|
||
.code testdata/code.txt HL1 | ||
|
||
--- | ||
<h1>Code</h1> | ||
<section> | ||
<p>Code:</p> | ||
<div class="code"> | ||
<pre><span num="1">code file</span> | ||
<span num="2">Snippet</span> | ||
<span num="3">important</span> | ||
</pre> | ||
</div> | ||
<p>Snippet:</p> | ||
<div class="code"> | ||
<pre><span num="2">Snippet</span> | ||
</pre> | ||
</div> | ||
<p>Highlight:</p> | ||
<div class="code"> | ||
<pre><span num="1">code file</span> | ||
<span num="2">Snippet</span> | ||
<span num="3"><b>important</b></span> | ||
</pre> | ||
</div> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# List | ||
|
||
## | ||
|
||
- Item 1 | ||
on two lines. | ||
- Item 2. | ||
- Item 3. | ||
|
||
- Item 4 in list despite preceding blank line. | ||
- Item 5. | ||
|
||
--- | ||
<h1>List</h1> | ||
<section> | ||
<ul> | ||
<li> | ||
<p>Item 1 | ||
on two lines.</p> | ||
</li> | ||
<li> | ||
<p>Item 2.</p> | ||
</li> | ||
<li> | ||
<p>Item 3.</p> | ||
</li> | ||
<li> | ||
<p>Item 4 in list despite preceding blank line.</p> | ||
</li> | ||
<li> | ||
<p>Item 5.</p> | ||
</li> | ||
</ul> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Media | ||
|
||
## | ||
|
||
.image gopher.jpg _ 100 | ||
.caption A gopher. | ||
|
||
.iframe https://golang.org/ | ||
|
||
.link https://golang.org/ The Gopher's home. | ||
|
||
.html testdata/media.html | ||
|
||
--- | ||
<h1>Media</h1> | ||
<section> | ||
<img src="gopher.jpg" width="100" alt=""> | ||
<figcaption>A gopher.</figcaption> | ||
<iframe src="https://golang.org/"></iframe> | ||
<p class="link"><a href="https://golang.org/">The Gopher's home.</a></p> | ||
<!-- media.html --> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Pre | ||
|
||
## | ||
|
||
Pre with tab: | ||
|
||
code block | ||
on two lines | ||
|
||
Text with space: | ||
|
||
now a text block | ||
on two lines | ||
|
||
Pre with blank line: | ||
|
||
before | ||
|
||
after | ||
|
||
EOF | ||
|
||
--- | ||
<h1>Pre</h1> | ||
<section> | ||
<p>Pre with tab:</p> | ||
<pre><code>code block | ||
on two lines | ||
</code></pre> | ||
<p>Text with space:</p> | ||
<p>now a text block | ||
on two lines</p> | ||
<p>Pre with blank line:</p> | ||
<pre><code>before | ||
|
||
after | ||
</code></pre> | ||
<p>EOF</p> | ||
</section> |