-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New markdown to asciidoc tests #5716
Open
mb21
wants to merge
2
commits into
jgm:main
Choose a base branch
from
mb21:markdown-to-asciidoc-tests
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
converted from: <https://github.com/bodiam/markdown-to-asciidoc/tree/9bd90bc405a7d25b03822cc91154bcb315ab39bf/src/test/resources/nl/jworks/markdown_to_asciidoc/code.feature> | ||
|
||
Render a code block without language | ||
|
||
% pandoc -t asciidoc | ||
``` | ||
summary(cars$dist) | ||
summary(cars$speed) | ||
``` | ||
^D | ||
.... | ||
summary(cars$dist) | ||
summary(cars$speed) | ||
.... | ||
|
||
|
||
Render a code block without language containing HTML | ||
|
||
% pandoc -t asciidoc | ||
``` | ||
No language indicated, so no syntax highlighting. | ||
But let's throw in a <b>tag</b>. | ||
``` | ||
^D | ||
.... | ||
No language indicated, so no syntax highlighting. | ||
But let's throw in a <b>tag</b>. | ||
.... | ||
|
||
|
||
Render a javascript code block | ||
|
||
% pandoc -t asciidoc | ||
```javascript | ||
var s = "JavaScript syntax highlighting"; | ||
alert(s); | ||
``` | ||
^D | ||
[source,javascript] | ||
---- | ||
var s = "JavaScript syntax highlighting"; | ||
alert(s); | ||
---- | ||
|
||
|
||
Render a python code block | ||
|
||
% pandoc -t asciidoc | ||
```python | ||
s = "Python syntax highlighting" | ||
print s | ||
``` | ||
^D | ||
[source,python] | ||
---- | ||
s = "Python syntax highlighting" | ||
print s | ||
---- | ||
|
||
|
||
Render code block adjacent to preceding paragraph | ||
|
||
% pandoc -t asciidoc | ||
An example: | ||
|
||
```javascript | ||
var s = "JavaScript syntax highlighting"; | ||
alert(s); | ||
``` | ||
^D | ||
An example: | ||
|
||
[source,javascript] | ||
---- | ||
var s = "JavaScript syntax highlighting"; | ||
alert(s); | ||
---- | ||
|
||
|
||
Render inline code | ||
|
||
% pandoc -t asciidoc | ||
We defined the `add` function to | ||
^D | ||
We defined the `+add+` function to | ||
|
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,33 @@ | ||
converted from: <https://github.com/bodiam/markdown-to-asciidoc/tree/9bd90bc405a7d25b03822cc91154bcb315ab39bf/src/test/resources/nl/jworks/markdown_to_asciidoc/descriptionlists.feature> | ||
|
||
Render a description list | ||
|
||
``` | ||
% pandoc -t asciidoc | ||
Apple | ||
: Pomaceous fruit of plants of the genus Malus in | ||
the family Rosaceae. | ||
^D | ||
Apple:: | ||
Pomaceous fruit of plants of the genus Malus in the family Rosaceae. | ||
``` | ||
|
||
|
||
Render a multiple description lists | ||
|
||
``` | ||
% pandoc -t asciidoc | ||
Apple | ||
: Pomaceous fruit of plants of the genus Malus in | ||
the family Rosaceae. | ||
|
||
Orange | ||
: The fruit of an evergreen tree of the genus Citrus. | ||
^D | ||
Apple:: | ||
Pomaceous fruit of plants of the genus Malus in the family Rosaceae. | ||
Orange:: | ||
The fruit of an evergreen tree of the genus Citrus. | ||
``` | ||
|
||
|
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,94 @@ | ||
converted from: <https://github.com/bodiam/markdown-to-asciidoc/tree/9bd90bc405a7d25b03822cc91154bcb315ab39bf/src/test/resources/nl/jworks/markdown_to_asciidoc/headings.feature> | ||
|
||
Render a level 1 heading | ||
|
||
``` | ||
% pandoc -t asciidoc | ||
# Title # | ||
^D | ||
= Title | ||
``` | ||
|
||
|
||
Render a level 1 underscored heading | ||
|
||
``` | ||
% pandoc -t asciidoc | ||
Title | ||
===== | ||
^D | ||
= Title | ||
``` | ||
|
||
|
||
Render a level 2 heading | ||
|
||
``` | ||
% pandoc -t asciidoc | ||
## Title | ||
^D | ||
== Title | ||
``` | ||
|
||
|
||
Render a level 2 underscored heading | ||
|
||
``` | ||
% pandoc -t asciidoc | ||
Title | ||
----- | ||
^D | ||
== Title | ||
``` | ||
|
||
|
||
Render a level 3 heading | ||
|
||
``` | ||
% pandoc -t asciidoc | ||
## Title | ||
^D | ||
== Title | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ... and accordingly " |
||
``` | ||
|
||
|
||
Render a level 4 heading | ||
|
||
``` | ||
% pandoc -t asciidoc | ||
#### Title | ||
^D | ||
==== Title | ||
``` | ||
|
||
|
||
Render a level 5 heading | ||
|
||
``` | ||
% pandoc -t asciidoc | ||
##### Title | ||
^D | ||
===== Title | ||
``` | ||
|
||
|
||
Render a level 6 heading | ||
|
||
``` | ||
% pandoc -t asciidoc | ||
###### Title | ||
^D | ||
====== Title | ||
``` | ||
|
||
|
||
Render a heading with different styling | ||
|
||
``` | ||
% pandoc -t asciidoc | ||
# Title #### | ||
^D | ||
= Title | ||
``` | ||
|
||
|
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,21 @@ | ||
converted from: <https://github.com/bodiam/markdown-to-asciidoc/tree/9bd90bc405a7d25b03822cc91154bcb315ab39bf/src/test/resources/nl/jworks/markdown_to_asciidoc/lines.feature> | ||
|
||
Create 4 horizontal lines | ||
|
||
``` | ||
% pandoc -t asciidoc | ||
--- | ||
|
||
- - - | ||
|
||
*** | ||
|
||
* * * | ||
^D | ||
''' | ||
''' | ||
''' | ||
''' | ||
``` | ||
|
||
|
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,123 @@ | ||
converted from: <https://github.com/bodiam/markdown-to-asciidoc/tree/9bd90bc405a7d25b03822cc91154bcb315ab39bf/src/test/resources/nl/jworks/markdown_to_asciidoc/links.feature> | ||
|
||
Render an implicit inline link | ||
|
||
``` | ||
% pandoc -t asciidoc | ||
Use [http://example.com](http://example.com) for sample links in documentation. | ||
^D | ||
Use http://example.com for sample links in documentation. | ||
``` | ||
|
||
|
||
Render an inline link | ||
|
||
``` | ||
% pandoc -t asciidoc | ||
This is [an example](http://example.com/) inline link. | ||
^D | ||
This is http://example.com/[an example] inline link. | ||
``` | ||
|
||
|
||
Render linked text with comma | ||
|
||
``` | ||
% pandoc -t asciidoc | ||
This is [a very, very cool](http://example.com/) inline link. | ||
^D | ||
This is http://example.com/[a very, very cool] inline link. | ||
``` | ||
|
||
|
||
Render a reference style link with link definition | ||
|
||
``` | ||
% pandoc -t asciidoc | ||
The [syntax page][s] provides complete, detailed documentation for | ||
|
||
[s]: /projects/markdown/syntax "Markdown Syntax" | ||
^D | ||
The link:/projects/markdown/syntax[syntax page] provides complete, | ||
detailed documentation for | ||
``` | ||
|
||
|
||
Render a reference style link with link text | ||
|
||
``` | ||
% pandoc -t asciidoc | ||
The [syntax page] provides documentation | ||
|
||
[syntax page]: http://www.syntaxpage.com | ||
^D | ||
The http://www.syntaxpage.com[syntax page] provides documentation | ||
``` | ||
|
||
|
||
Render an internal link | ||
|
||
``` | ||
% pandoc -t asciidoc | ||
Refer to [Quick start](#quick-start) to learn how to get started. | ||
^D | ||
Refer to link:#quick-start[Quick start] to learn how to get started. | ||
``` | ||
|
||
|
||
Render an reference style image | ||
|
||
``` | ||
% pandoc -t asciidoc | ||
![Alt text][logo] | ||
|
||
[logo]: images/icons/home.png | ||
^D | ||
image:images/icons/home.png[Alt text] | ||
``` | ||
|
||
|
||
Render an inline image with parameters | ||
|
||
``` | ||
% pandoc -t asciidoc | ||
![Alt text](images/icons/home.png) | ||
|
||
![Alt text](images/icons/home.png?width=100) | ||
^D | ||
image:images/icons/home.png[Alt text] | ||
|
||
image:images/icons/home.png?width=100[Alt text] | ||
``` | ||
|
||
|
||
Render an inline image with comma in alt text | ||
|
||
``` | ||
% pandoc -t asciidoc | ||
![Alt,text](images/icons/home.png) | ||
^D | ||
image:images/icons/home.png["Alt,text"] | ||
``` | ||
|
||
|
||
Render a hyperlinked inline image with alt text | ||
|
||
``` | ||
% pandoc -t asciidoc | ||
[![Build Status](https://travis-ci.org/asciidoctor/asciidoctor.png)](https://travis-ci.org/asciidoctor/asciidoctor) | ||
^D | ||
image:https://travis-ci.org/asciidoctor/asciidoctor.png[Build Status,link=https://travis-ci.org/asciidoctor/asciidoctor] | ||
``` | ||
|
||
|
||
Render a hyperlinked inline image with no alt text | ||
|
||
``` | ||
% pandoc -t asciidoc | ||
[![](https://travis-ci.org/asciidoctor/asciidoctor.png)](https://travis-ci.org/asciidoctor/asciidoctor) | ||
^D | ||
image:https://travis-ci.org/asciidoctor/asciidoctor.png[link=https://travis-ci.org/asciidoctor/asciidoctor] | ||
``` | ||
|
||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this read "
### Title
" ...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe :) We should probably implement #5615
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmmm, beside the discussion in #5615, the comment for this test case (line 45 "Render a level 3 heading") does not match the actual test data in lines 49 to 51, as it is just a level 2 heading (which is tested also in lines 24 .. 31 above).