mirror of
https://github.com/sharkdp/bat.git
synced 2025-01-13 09:08:22 +01:00
test: add asciidoc highlight test
This commit is contained in:
parent
66c7aca2f6
commit
2d9b936b0a
173
tests/syntax-tests/highlighted/AsciiDoc/test.adoc
Normal file
173
tests/syntax-tests/highlighted/AsciiDoc/test.adoc
Normal file
@ -0,0 +1,173 @@
|
||||
[38;2;253;151;31m=[0m[38;2;253;151;31m [0m[38;2;253;151;31mThis is the document title[0m
|
||||
[38;2;248;248;242mAuthor McAuthorson <author@author.org>[0m
|
||||
|
||||
[38;2;253;151;31m==[0m[38;2;253;151;31m [0m[38;2;253;151;31mTable of Content[0m
|
||||
|
||||
[38;2;248;248;242m:[0m[38;2;248;248;242mtoc[0m[38;2;248;248;242m:[0m
|
||||
|
||||
[38;2;253;151;31m==[0m[38;2;253;151;31m [0m[38;2;253;151;31mParagraphs[0m
|
||||
|
||||
[38;2;248;248;242m[[0m[38;2;248;248;242m.lead[0m[38;2;248;248;242m][0m
|
||||
[38;2;248;248;242mThis text will be styled as a lead paragraph with a larger font.[0m
|
||||
|
||||
[38;2;248;248;242mThis is a normal paragraph.[0m
|
||||
|
||||
[38;2;248;248;242m This is a literal paragraph that is offset by one space, [0m
|
||||
[38;2;248;248;242m it will be rendered in a fixed-width font.[0m
|
||||
|
||||
[38;2;102;217;239mNOTE:[0m[38;2;248;248;242m This is an admonition paragraph[0m
|
||||
|
||||
[38;2;102;217;239mTIP:[0m[38;2;248;248;242m This is another admonition paragraph[0m
|
||||
|
||||
[38;2;253;151;31m==[0m[38;2;253;151;31m [0m[38;2;253;151;31mFormatted text[0m
|
||||
|
||||
[1;38;2;249;38;114m*[0m[1;38;2;249;38;114mbold text[0m[1;38;2;249;38;114m*[0m
|
||||
|
||||
[3;38;2;228;46;112m_[0m[3;38;2;228;46;112mitalic text[0m[3;38;2;228;46;112m_[0m
|
||||
|
||||
[1;38;2;249;38;114m*[0m[3;38;2;228;46;112m_[0m[3;38;2;228;46;112mbold italic text[0m[3;38;2;228;46;112m_[0m[1;38;2;249;38;114m*[0m
|
||||
|
||||
[38;2;230;219;116m`[0m[38;2;230;219;116mmonospace text[0m[38;2;230;219;116m`[0m
|
||||
|
||||
[38;2;230;219;116m`[0m[1;38;2;249;38;114m*[0m[1;38;2;249;38;114mbold monospace[0m[1;38;2;249;38;114m*[0m[38;2;230;219;116m`[0m
|
||||
|
||||
[38;2;230;219;116m`[0m[3;38;2;228;46;112m_[0m[3;38;2;228;46;112mitalic monospace[0m[3;38;2;228;46;112m_[0m[38;2;230;219;116m`[0m
|
||||
|
||||
[38;2;230;219;116m`[0m[1;38;2;249;38;114m*[0m[3;38;2;228;46;112m_[0m[3;38;2;228;46;112mbold and italic monospace[0m[3;38;2;228;46;112m_[0m[1;38;2;249;38;114m*[0m[38;2;230;219;116m`[0m
|
||||
|
||||
[38;2;248;248;242mThe following word is [0m[38;2;230;219;116m#[0m[38;2;230;219;116mhighlighted[0m[38;2;230;219;116m#[0m
|
||||
|
||||
[38;2;248;248;242mThe following words are [0m[38;2;230;219;116m[.small][0m[38;2;230;219;116m#[0m[38;2;230;219;116msmall print[0m[38;2;230;219;116m#[0m
|
||||
|
||||
[38;2;248;248;242mThe following word is [0m[38;2;230;219;116m[.underline][0m[38;2;230;219;116m#[0m[38;2;230;219;116munderlined[0m[38;2;230;219;116m#[0m
|
||||
|
||||
[38;2;248;248;242mThe following word is [0m[38;2;230;219;116m[.line-through][0m[38;2;230;219;116m#[0m[38;2;230;219;116mline-through[0m[38;2;230;219;116m#[0m
|
||||
|
||||
[38;2;248;248;242mThe following word is [0m[38;2;230;219;116m[.big][0m[38;2;230;219;116m#[0m[38;2;230;219;116mbig[0m[38;2;230;219;116m#[0m
|
||||
|
||||
[38;2;248;248;242mThe following word is printed in [0m[38;2;230;219;116m^[0m[38;2;230;219;116msuperscript^[0m
|
||||
|
||||
[38;2;248;248;242mThe following word is printed in [0m[38;2;230;219;116m~[0m[38;2;230;219;116msub-script[0m[38;2;230;219;116m~[0m
|
||||
|
||||
[38;2;253;151;31m==[0m[38;2;253;151;31m [0m[38;2;253;151;31mInclude[0m
|
||||
|
||||
[38;2;249;38;114minclude[0m[38;2;190;132;255m::[0m[4;38;2;166;226;46mnot_existing.adoc[0m[38;2;190;132;255m[[0m[38;2;190;132;255m][0m
|
||||
|
||||
[38;2;253;151;31m==[0m[38;2;253;151;31m [0m[38;2;253;151;31mBreaks[0m
|
||||
[38;2;248;248;242mHere we have a [0m[38;2;248;248;242m+[0m
|
||||
[38;2;248;248;242mline break.[0m
|
||||
|
||||
[38;2;248;248;242mBelow is a horizontal rule.[0m
|
||||
|
||||
[1;38;2;255;255;255m'''[0m
|
||||
|
||||
[38;2;248;248;242mAnd below here is a page break.[0m
|
||||
|
||||
[1;38;2;255;255;255m<<<[0m
|
||||
|
||||
[38;2;253;151;31m==[0m[38;2;253;151;31m [0m[38;2;253;151;31mLists[0m
|
||||
|
||||
[38;2;190;132;255m*[0m[38;2;248;248;242m [0m[38;2;248;248;242mThis is[0m
|
||||
[38;2;190;132;255m*[0m[38;2;248;248;242m [0m[38;2;248;248;242man unordered[0m
|
||||
[38;2;190;132;255m*[0m[38;2;248;248;242m [0m[38;2;248;248;242mlist[0m
|
||||
[38;2;190;132;255m**[0m[38;2;248;248;242m [0m[38;2;248;248;242mwith nested[0m
|
||||
[38;2;190;132;255m***[0m[38;2;248;248;242m [0m[38;2;248;248;242melements[0m
|
||||
|
||||
[1;38;2;255;255;255m'''[0m
|
||||
|
||||
[38;2;190;132;255m-[0m[38;2;248;248;242m [0m[38;2;248;248;242mThis is also an[0m
|
||||
[38;2;190;132;255m-[0m[38;2;248;248;242m [0m[38;2;248;248;242munordered[0m
|
||||
[38;2;190;132;255m-[0m[38;2;248;248;242m [0m[38;2;248;248;242mlist[0m
|
||||
|
||||
[1;38;2;255;255;255m'''[0m
|
||||
|
||||
[38;2;190;132;255m.[0m[38;2;248;248;242m [0m[38;2;248;248;242mAnd this is[0m
|
||||
[38;2;190;132;255m.[0m[38;2;248;248;242m [0m[38;2;248;248;242man ordered[0m
|
||||
[38;2;190;132;255m.[0m[38;2;248;248;242m [0m[38;2;248;248;242mlist[0m
|
||||
[38;2;190;132;255m..[0m[38;2;248;248;242m [0m[38;2;248;248;242mwith nested[0m
|
||||
[38;2;190;132;255m...[0m[38;2;248;248;242m [0m[38;2;248;248;242melements[0m
|
||||
|
||||
[1;38;2;255;255;255m'''[0m
|
||||
|
||||
[38;2;117;113;94m//[0m[38;2;117;113;94m* [*] checked[0m
|
||||
[38;2;190;132;255m*[0m[38;2;248;248;242m [0m[38;2;248;248;242m[x] also checked[0m
|
||||
[38;2;190;132;255m*[0m[38;2;248;248;242m [0m[38;2;248;248;242m[ ] not checked[0m
|
||||
[38;2;190;132;255m*[0m[38;2;248;248;242m [0m[38;2;248;248;242mnormal list item[0m
|
||||
|
||||
[1;38;2;255;255;255m'''[0m
|
||||
|
||||
[38;2;248;248;242m[[0m[38;2;248;248;242mqanda[0m[38;2;248;248;242m][0m
|
||||
[38;2;248;248;242mWhat is this?[0m[38;2;248;248;242m::[0m
|
||||
[38;2;248;248;242m This is a Q&A[0m
|
||||
[38;2;248;248;242mAnd what is this?[0m[38;2;248;248;242m::[0m[38;2;248;248;242m [0m[38;2;248;248;242mAlso a Q&A[0m
|
||||
|
||||
[38;2;253;151;31m==[0m[38;2;253;151;31m [0m[38;2;253;151;31mLinks[0m
|
||||
[38;2;248;248;242mThe following link will be created automatically: https://asciidoctor.org[0m
|
||||
|
||||
[38;2;253;151;31m.[0m[38;2;253;151;31mAn image caption[0m
|
||||
[38;2;249;38;114mimage[0m[38;2;190;132;255m::[0m[4;38;2;166;226;46mnot_existing.jpg[0m[38;2;190;132;255m[[0m[3;38;2;253;151;31malt text[0m[38;2;190;132;255m][0m
|
||||
|
||||
[38;2;253;151;31m.[0m[38;2;253;151;31mA video caption[0m
|
||||
[38;2;249;38;114mvideo[0m[38;2;190;132;255m::[0m[4;38;2;166;226;46mnot_existing.mp4[0m[38;2;190;132;255m[[0m[3;38;2;253;151;31malt text[0m[38;2;190;132;255m][0m
|
||||
|
||||
[38;2;253;151;31m==[0m[38;2;253;151;31m [0m[38;2;253;151;31mSource Code[0m
|
||||
[38;2;248;248;242mThe following word is [0m[38;2;230;219;116m`[0m[38;2;230;219;116mmonospace[0m[38;2;230;219;116m`[0m[38;2;248;248;242m.[0m
|
||||
|
||||
[38;2;102;217;239m....[0m
|
||||
[38;2;230;219;116mThis is a literal block[0m
|
||||
[38;2;230;219;116mwhere linebreaks are rendered[0m
|
||||
[38;2;102;217;239m....[0m
|
||||
|
||||
[38;2;253;151;31m.[0m[38;2;253;151;31mexample.java[0m
|
||||
[38;2;248;248;242m[[0m[38;2;248;248;242msource,java[0m[38;2;248;248;242m][0m
|
||||
[38;2;248;248;242m----[0m
|
||||
[38;2;248;248;242mpublic class Example { // [0m[38;2;190;132;255m<[0m[38;2;190;132;255m1[0m[38;2;190;132;255m>[0m
|
||||
[38;2;248;248;242m private static boolean isExample = true; // [0m[38;2;190;132;255m<[0m[38;2;190;132;255m2[0m[38;2;190;132;255m>[0m
|
||||
[38;2;248;248;242m}[0m
|
||||
[38;2;248;248;242m----[0m
|
||||
[38;2;190;132;255m<[0m[38;2;190;132;255m1[0m[38;2;190;132;255m>[0m[38;2;248;248;242m [0m[38;2;248;248;242mThis is a callout[0m
|
||||
[38;2;190;132;255m<[0m[38;2;190;132;255m2[0m[38;2;190;132;255m>[0m[38;2;248;248;242m [0m[38;2;248;248;242mThis is another callout[0m
|
||||
|
||||
[38;2;253;151;31m==[0m[38;2;253;151;31m [0m[38;2;253;151;31mMisc[0m
|
||||
|
||||
[38;2;253;151;31m.[0m[38;2;253;151;31mA sidebar[0m
|
||||
[38;2;102;217;239m****[0m
|
||||
[38;2;230;219;116mThis will be rendered like a sidebar[0m
|
||||
[38;2;102;217;239m****[0m
|
||||
|
||||
[3;38;2;102;217;239m____[0m
|
||||
[3;38;2;102;217;239mThis is a random blockquote[0m
|
||||
[3;38;2;102;217;239m____[0m
|
||||
|
||||
[38;2;248;248;242m[[0m[38;2;248;248;242mquote, Albert Einstein, 'Scientist'[0m[38;2;248;248;242m][0m
|
||||
[3;38;2;102;217;239m____[0m
|
||||
[3;38;2;102;217;239mThis is not actually something Einstein said[0m
|
||||
[3;38;2;102;217;239m____[0m
|
||||
|
||||
[38;2;117;113;94m//[0m[38;2;117;113;94m here we have a single line comment[0m
|
||||
|
||||
[38;2;117;113;94m////[0m
|
||||
[38;2;117;113;94mand this is a[0m
|
||||
[38;2;117;113;94mmultiline comment[0m
|
||||
[38;2;117;113;94m////[0m
|
||||
|
||||
[38;2;253;151;31m.[0m[38;2;253;151;31mA Table[0m
|
||||
[38;2;248;248;242m[[0m[38;2;248;248;242m%header[0m[38;2;248;248;242m][0m
|
||||
[38;2;248;248;242m|===[0m
|
||||
[38;2;248;248;242m|Header Column 1 |Header Column 2 |And the last header column[0m
|
||||
[38;2;248;248;242m|Cell in col1[0m
|
||||
[38;2;248;248;242m|Cell in col2[0m
|
||||
[38;2;248;248;242m|Cell in col3[0m
|
||||
|
||||
[38;2;248;248;242m|Cell in col1, row2[0m
|
||||
[38;2;248;248;242m|Cell in col2, row2[0m
|
||||
[38;2;248;248;242m|Cell in col3, row2[0m
|
||||
[38;2;248;248;242m|===[0m
|
||||
|
||||
[38;2;253;151;31m.[0m[38;2;253;151;31mA Table from CSV[0m
|
||||
[38;2;248;248;242m[[0m[38;2;248;248;242m%header, format=csv[0m[38;2;248;248;242m][0m
|
||||
[38;2;248;248;242m|===[0m
|
||||
[38;2;248;248;242mheader col1, header col2, header col3[0m
|
||||
[38;2;248;248;242mThis,is the first, row[0m
|
||||
[38;2;248;248;242mThis, is the second, row[0m
|
||||
[38;2;248;248;242m|===[0m
|
173
tests/syntax-tests/source/AsciiDoc/test.adoc
Normal file
173
tests/syntax-tests/source/AsciiDoc/test.adoc
Normal file
@ -0,0 +1,173 @@
|
||||
= This is the document title
|
||||
Author McAuthorson <author@author.org>
|
||||
|
||||
== Table of Content
|
||||
|
||||
:toc:
|
||||
|
||||
== Paragraphs
|
||||
|
||||
[.lead]
|
||||
This text will be styled as a lead paragraph with a larger font.
|
||||
|
||||
This is a normal paragraph.
|
||||
|
||||
This is a literal paragraph that is offset by one space,
|
||||
it will be rendered in a fixed-width font.
|
||||
|
||||
NOTE: This is an admonition paragraph
|
||||
|
||||
TIP: This is another admonition paragraph
|
||||
|
||||
== Formatted text
|
||||
|
||||
*bold text*
|
||||
|
||||
_italic text_
|
||||
|
||||
*_bold italic text_*
|
||||
|
||||
`monospace text`
|
||||
|
||||
`*bold monospace*`
|
||||
|
||||
`_italic monospace_`
|
||||
|
||||
`*_bold and italic monospace_*`
|
||||
|
||||
The following word is #highlighted#
|
||||
|
||||
The following words are [.small]#small print#
|
||||
|
||||
The following word is [.underline]#underlined#
|
||||
|
||||
The following word is [.line-through]#line-through#
|
||||
|
||||
The following word is [.big]#big#
|
||||
|
||||
The following word is printed in ^superscript^
|
||||
|
||||
The following word is printed in ~sub-script~
|
||||
|
||||
== Include
|
||||
|
||||
include::not_existing.adoc[]
|
||||
|
||||
== Breaks
|
||||
Here we have a +
|
||||
line break.
|
||||
|
||||
Below is a horizontal rule.
|
||||
|
||||
'''
|
||||
|
||||
And below here is a page break.
|
||||
|
||||
<<<
|
||||
|
||||
== Lists
|
||||
|
||||
* This is
|
||||
* an unordered
|
||||
* list
|
||||
** with nested
|
||||
*** elements
|
||||
|
||||
'''
|
||||
|
||||
- This is also an
|
||||
- unordered
|
||||
- list
|
||||
|
||||
'''
|
||||
|
||||
. And this is
|
||||
. an ordered
|
||||
. list
|
||||
.. with nested
|
||||
... elements
|
||||
|
||||
'''
|
||||
|
||||
//* [*] checked
|
||||
* [x] also checked
|
||||
* [ ] not checked
|
||||
* normal list item
|
||||
|
||||
'''
|
||||
|
||||
[qanda]
|
||||
What is this?::
|
||||
This is a Q&A
|
||||
And what is this?:: Also a Q&A
|
||||
|
||||
== Links
|
||||
The following link will be created automatically: https://asciidoctor.org
|
||||
|
||||
.An image caption
|
||||
image::not_existing.jpg[alt text]
|
||||
|
||||
.A video caption
|
||||
video::not_existing.mp4[alt text]
|
||||
|
||||
== Source Code
|
||||
The following word is `monospace`.
|
||||
|
||||
....
|
||||
This is a literal block
|
||||
where linebreaks are rendered
|
||||
....
|
||||
|
||||
.example.java
|
||||
[source,java]
|
||||
----
|
||||
public class Example { // <1>
|
||||
private static boolean isExample = true; // <2>
|
||||
}
|
||||
----
|
||||
<1> This is a callout
|
||||
<2> This is another callout
|
||||
|
||||
== Misc
|
||||
|
||||
.A sidebar
|
||||
****
|
||||
This will be rendered like a sidebar
|
||||
****
|
||||
|
||||
____
|
||||
This is a random blockquote
|
||||
____
|
||||
|
||||
[quote, Albert Einstein, 'Scientist']
|
||||
____
|
||||
This is not actually something Einstein said
|
||||
____
|
||||
|
||||
// here we have a single line comment
|
||||
|
||||
////
|
||||
and this is a
|
||||
multiline comment
|
||||
////
|
||||
|
||||
.A Table
|
||||
[%header]
|
||||
|===
|
||||
|Header Column 1 |Header Column 2 |And the last header column
|
||||
|Cell in col1
|
||||
|Cell in col2
|
||||
|Cell in col3
|
||||
|
||||
|Cell in col1, row2
|
||||
|Cell in col2, row2
|
||||
|Cell in col3, row2
|
||||
|===
|
||||
|
||||
.A Table from CSV
|
||||
[%header, format=csv]
|
||||
|===
|
||||
header col1, header col2, header col3
|
||||
This,is the first, row
|
||||
This, is the second, row
|
||||
|===
|
Loading…
Reference in New Issue
Block a user