kramdown-asciidoc 1.0.0.alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.adoc +10 -0
- data/Gemfile +3 -0
- data/LICENSE.adoc +22 -0
- data/README.adoc +147 -0
- data/Rakefile +3 -0
- data/bin/kramdoc +24 -0
- data/kramdown-asciidoc.gemspec +41 -0
- data/lib/kramdown-asciidoc.rb +2 -0
- data/lib/kramdown-asciidoc/converter.rb +413 -0
- data/lib/kramdown-asciidoc/version.rb +3 -0
- data/spec/converter_spec.rb +114 -0
- data/spec/fixtures/a/bare-url.adoc +1 -0
- data/spec/fixtures/a/bare-url.md +1 -0
- data/spec/fixtures/a/interdoc-xref.adoc +1 -0
- data/spec/fixtures/a/interdoc-xref.md +1 -0
- data/spec/fixtures/a/internal.adoc +5 -0
- data/spec/fixtures/a/internal.md +5 -0
- data/spec/fixtures/a/local.adoc +1 -0
- data/spec/fixtures/a/local.md +1 -0
- data/spec/fixtures/a/url-matches-text.adoc +1 -0
- data/spec/fixtures/a/url-matches-text.md +1 -0
- data/spec/fixtures/a/url-with-text.adoc +1 -0
- data/spec/fixtures/a/url-with-text.md +1 -0
- data/spec/fixtures/blockquote/basic.adoc +3 -0
- data/spec/fixtures/blockquote/basic.md +1 -0
- data/spec/fixtures/blockquote/list.adoc +5 -0
- data/spec/fixtures/blockquote/list.md +3 -0
- data/spec/fixtures/blockquote/multiple-lines.adoc +5 -0
- data/spec/fixtures/blockquote/multiple-lines.md +3 -0
- data/spec/fixtures/blockquote/nested.adoc +7 -0
- data/spec/fixtures/blockquote/nested.md +3 -0
- data/spec/fixtures/blockquote/with-attribution.adoc +5 -0
- data/spec/fixtures/blockquote/with-attribution.md +3 -0
- data/spec/fixtures/br/tag-followed-by-newline.adoc +3 -0
- data/spec/fixtures/br/tag-followed-by-newline.md +3 -0
- data/spec/fixtures/br/tag-preceded-by-space.adoc +3 -0
- data/spec/fixtures/br/tag-preceded-by-space.md +1 -0
- data/spec/fixtures/br/tag.adoc +3 -0
- data/spec/fixtures/br/tag.md +1 -0
- data/spec/fixtures/br/trailing-double-space.adoc +3 -0
- data/spec/fixtures/br/trailing-double-space.md +3 -0
- data/spec/fixtures/codeblock/contiguous-lines.adoc +5 -0
- data/spec/fixtures/codeblock/contiguous-lines.md +3 -0
- data/spec/fixtures/codeblock/fenced/bash-to-console.adoc +4 -0
- data/spec/fixtures/codeblock/fenced/bash-to-console.md +3 -0
- data/spec/fixtures/codeblock/fenced/with-command-prompt.adoc +1 -0
- data/spec/fixtures/codeblock/fenced/with-command-prompt.md +3 -0
- data/spec/fixtures/codeblock/fenced/with-language.adoc +8 -0
- data/spec/fixtures/codeblock/fenced/with-language.md +7 -0
- data/spec/fixtures/codeblock/fenced/with-non-contiguous-command-prompts.adoc +5 -0
- data/spec/fixtures/codeblock/fenced/with-non-contiguous-command-prompts.md +5 -0
- data/spec/fixtures/codeblock/fenced/without-language.adoc +5 -0
- data/spec/fixtures/codeblock/fenced/without-language.md +5 -0
- data/spec/fixtures/codeblock/non-contiguous-lines.adoc +7 -0
- data/spec/fixtures/codeblock/non-contiguous-lines.md +5 -0
- data/spec/fixtures/codeblock/with-command-prompt.adoc +1 -0
- data/spec/fixtures/codeblock/with-command-prompt.md +1 -0
- data/spec/fixtures/codeblock/with-non-contiguous-command-prompts.adoc +5 -0
- data/spec/fixtures/codeblock/with-non-contiguous-command-prompts.md +3 -0
- data/spec/fixtures/codespan/constrained.adoc +1 -0
- data/spec/fixtures/codespan/constrained.md +1 -0
- data/spec/fixtures/codespan/literal.adoc +3 -0
- data/spec/fixtures/codespan/literal.md +3 -0
- data/spec/fixtures/em/asterisks.adoc +1 -0
- data/spec/fixtures/em/asterisks.md +1 -0
- data/spec/fixtures/em/constrained.adoc +1 -0
- data/spec/fixtures/em/constrained.md +1 -0
- data/spec/fixtures/entity/numeric.adoc +1 -0
- data/spec/fixtures/entity/numeric.md +1 -0
- data/spec/fixtures/entity/reverse.adoc +1 -0
- data/spec/fixtures/entity/reverse.md +1 -0
- data/spec/fixtures/heading/out-of-sequence.adoc +23 -0
- data/spec/fixtures/heading/out-of-sequence.md +21 -0
- data/spec/fixtures/heading/outline.adoc +13 -0
- data/spec/fixtures/heading/outline.md +13 -0
- data/spec/fixtures/heading/with-anchor.adoc +2 -0
- data/spec/fixtures/heading/with-anchor.md +1 -0
- data/spec/fixtures/heading/with-formatting.adoc +1 -0
- data/spec/fixtures/heading/with-formatting.md +1 -0
- data/spec/fixtures/hr/between-blocks.adoc +5 -0
- data/spec/fixtures/hr/between-blocks.md +5 -0
- data/spec/fixtures/hr/dashes.adoc +1 -0
- data/spec/fixtures/hr/dashes.md +1 -0
- data/spec/fixtures/html_element/abbr.adoc +1 -0
- data/spec/fixtures/html_element/abbr.md +1 -0
- data/spec/fixtures/html_element/heading-with-class.adoc +7 -0
- data/spec/fixtures/html_element/heading-with-class.md +5 -0
- data/spec/fixtures/html_element/heading-with-id.adoc +2 -0
- data/spec/fixtures/html_element/heading-with-id.md +1 -0
- data/spec/fixtures/html_element/native.adoc +1 -0
- data/spec/fixtures/html_element/native.md +1 -0
- data/spec/fixtures/html_element/sub.adoc +1 -0
- data/spec/fixtures/html_element/sub.md +1 -0
- data/spec/fixtures/html_element/sup.adoc +1 -0
- data/spec/fixtures/html_element/sup.md +1 -0
- data/spec/fixtures/img/block-with-alt.adoc +1 -0
- data/spec/fixtures/img/block-with-alt.md +1 -0
- data/spec/fixtures/img/block-with-link-and-alt.adoc +1 -0
- data/spec/fixtures/img/block-with-link-and-alt.md +1 -0
- data/spec/fixtures/img/block-with-link.adoc +1 -0
- data/spec/fixtures/img/block-with-link.md +1 -0
- data/spec/fixtures/img/block.adoc +1 -0
- data/spec/fixtures/img/block.md +1 -0
- data/spec/fixtures/img/imagesdir.adoc +4 -0
- data/spec/fixtures/img/imagesdir.md +3 -0
- data/spec/fixtures/img/imagesdir.opts +2 -0
- data/spec/fixtures/img/implicit-imagesdir.adoc +3 -0
- data/spec/fixtures/img/implicit-imagesdir.md +3 -0
- data/spec/fixtures/img/implicit-imagesdir.opts +2 -0
- data/spec/fixtures/img/inline-with-alt.adoc +1 -0
- data/spec/fixtures/img/inline-with-alt.md +1 -0
- data/spec/fixtures/img/inline-with-link-and-alt.adoc +1 -0
- data/spec/fixtures/img/inline-with-link-and-alt.md +1 -0
- data/spec/fixtures/img/inline-with-link.adoc +1 -0
- data/spec/fixtures/img/inline-with-link.md +1 -0
- data/spec/fixtures/img/inline.adoc +1 -0
- data/spec/fixtures/img/inline.md +1 -0
- data/spec/fixtures/ol/compound-separated.adoc +25 -0
- data/spec/fixtures/ol/compound-separated.md +23 -0
- data/spec/fixtures/ol/compound.adoc +25 -0
- data/spec/fixtures/ol/compound.md +18 -0
- data/spec/fixtures/ol/mixed-separated.adoc +6 -0
- data/spec/fixtures/ol/mixed-separated.md +11 -0
- data/spec/fixtures/ol/mixed.adoc +6 -0
- data/spec/fixtures/ol/mixed.md +6 -0
- data/spec/fixtures/ol/nested-separated.adoc +7 -0
- data/spec/fixtures/ol/nested-separated.md +13 -0
- data/spec/fixtures/ol/nested.adoc +7 -0
- data/spec/fixtures/ol/nested.md +7 -0
- data/spec/fixtures/ol/simple-separated.adoc +4 -0
- data/spec/fixtures/ol/simple-separated.md +7 -0
- data/spec/fixtures/ol/simple.adoc +4 -0
- data/spec/fixtures/ol/simple.md +4 -0
- data/spec/fixtures/p/admonition/emphasis.adoc +11 -0
- data/spec/fixtures/p/admonition/emphasis.md +11 -0
- data/spec/fixtures/p/admonition/in-list-item.adoc +6 -0
- data/spec/fixtures/p/admonition/in-list-item.md +6 -0
- data/spec/fixtures/p/admonition/plain.adoc +11 -0
- data/spec/fixtures/p/admonition/plain.md +11 -0
- data/spec/fixtures/p/admonition/strong-emphasis.adoc +11 -0
- data/spec/fixtures/p/admonition/strong-emphasis.md +11 -0
- data/spec/fixtures/p/multiple-lines.adoc +2 -0
- data/spec/fixtures/p/multiple-lines.md +2 -0
- data/spec/fixtures/p/multiple.adoc +3 -0
- data/spec/fixtures/p/multiple.md +3 -0
- data/spec/fixtures/p/single-line.adoc +1 -0
- data/spec/fixtures/p/single-line.md +1 -0
- data/spec/fixtures/root/body-only.adoc +1 -0
- data/spec/fixtures/root/body-only.md +1 -0
- data/spec/fixtures/root/book-doctype.adoc +10 -0
- data/spec/fixtures/root/book-doctype.md +9 -0
- data/spec/fixtures/root/header-and-body.adoc +3 -0
- data/spec/fixtures/root/header-and-body.md +3 -0
- data/spec/fixtures/root/header-only.adoc +1 -0
- data/spec/fixtures/root/header-only.md +1 -0
- data/spec/fixtures/smart_quote/apostrophe.adoc +1 -0
- data/spec/fixtures/smart_quote/apostrophe.md +1 -0
- data/spec/fixtures/smart_quote/double-quotes.adoc +1 -0
- data/spec/fixtures/smart_quote/double-quotes.md +1 -0
- data/spec/fixtures/smart_quote/single-quotes.adoc +1 -0
- data/spec/fixtures/smart_quote/single-quotes.md +1 -0
- data/spec/fixtures/strong/constrained.adoc +1 -0
- data/spec/fixtures/strong/constrained.md +1 -0
- data/spec/fixtures/strong/nested-emphasis.adoc +1 -0
- data/spec/fixtures/strong/nested-emphasis.md +1 -0
- data/spec/fixtures/table/with-header.adoc +9 -0
- data/spec/fixtures/table/with-header.md +4 -0
- data/spec/fixtures/table/without-header.adoc +8 -0
- data/spec/fixtures/table/without-header.md +2 -0
- data/spec/fixtures/text/lte.adoc +1 -0
- data/spec/fixtures/text/lte.md +1 -0
- data/spec/fixtures/text/plus-plus.adoc +6 -0
- data/spec/fixtures/text/plus-plus.md +5 -0
- data/spec/fixtures/text/typographic_sym/apostrophe.adoc +1 -0
- data/spec/fixtures/text/typographic_sym/apostrophe.md +1 -0
- data/spec/fixtures/text/typographic_sym/double-quotes.adoc +1 -0
- data/spec/fixtures/text/typographic_sym/double-quotes.md +1 -0
- data/spec/fixtures/text/typographic_sym/ellipsis.adoc +1 -0
- data/spec/fixtures/text/typographic_sym/ellipsis.md +1 -0
- data/spec/fixtures/text/typographic_sym/mdash.adoc +1 -0
- data/spec/fixtures/text/typographic_sym/mdash.md +1 -0
- data/spec/fixtures/text/typographic_sym/ndash.adoc +1 -0
- data/spec/fixtures/text/typographic_sym/ndash.md +1 -0
- data/spec/fixtures/text/typographic_sym/single-quotes.adoc +1 -0
- data/spec/fixtures/text/typographic_sym/single-quotes.md +1 -0
- data/spec/fixtures/typographic_sym/ellipsis.adoc +1 -0
- data/spec/fixtures/typographic_sym/ellipsis.md +1 -0
- data/spec/fixtures/typographic_sym/mdash.adoc +1 -0
- data/spec/fixtures/typographic_sym/mdash.md +1 -0
- data/spec/fixtures/typographic_sym/ndash.adoc +1 -0
- data/spec/fixtures/typographic_sym/ndash.md +1 -0
- data/spec/fixtures/ul/compound-separated.adoc +25 -0
- data/spec/fixtures/ul/compound-separated.md +23 -0
- data/spec/fixtures/ul/compound.adoc +25 -0
- data/spec/fixtures/ul/compound.md +18 -0
- data/spec/fixtures/ul/nested-separated.adoc +11 -0
- data/spec/fixtures/ul/nested-separated.md +21 -0
- data/spec/fixtures/ul/nested.adoc +11 -0
- data/spec/fixtures/ul/nested.md +11 -0
- data/spec/fixtures/ul/simple-separated.adoc +3 -0
- data/spec/fixtures/ul/simple-separated.md +5 -0
- data/spec/fixtures/ul/simple.adoc +3 -0
- data/spec/fixtures/ul/simple.md +3 -0
- data/spec/fixtures/xml_comment/block.adoc +7 -0
- data/spec/fixtures/xml_comment/block.md +6 -0
- data/spec/fixtures/xml_comment/line-offset-by-space.adoc +1 -0
- data/spec/fixtures/xml_comment/line-offset-by-space.md +1 -0
- data/spec/fixtures/xml_comment/line.adoc +1 -0
- data/spec/fixtures/xml_comment/line.md +1 -0
- data/spec/fixtures/xml_comment/list-separator.adoc +7 -0
- data/spec/fixtures/xml_comment/list-separator.md +7 -0
- data/spec/fixtures/xml_comment/mixed.adoc +7 -0
- data/spec/fixtures/xml_comment/mixed.md +6 -0
- data/spec/fixtures/xml_comment/multiline-span.adoc +4 -0
- data/spec/fixtures/xml_comment/multiline-span.md +3 -0
- data/spec/fixtures/xml_comment/styled.adoc +6 -0
- data/spec/fixtures/xml_comment/styled.md +6 -0
- data/spec/integration_spec.rb +27 -0
- data/spec/spec_helper.rb +9 -0
- metadata +533 -0
@@ -0,0 +1,11 @@
|
|
1
|
+
NOTE: Remember the milk!
|
2
|
+
|
3
|
+
IMPORTANT: Don't forget the children!
|
4
|
+
|
5
|
+
TIP: Look for the warp zone under the bridge.
|
6
|
+
|
7
|
+
CAUTION: Slippery when wet.
|
8
|
+
|
9
|
+
WARNING: The software you're about to use has not been tested.
|
10
|
+
|
11
|
+
IMPORTANT: Sign off before stepping away from the computer.
|
@@ -0,0 +1,11 @@
|
|
1
|
+
**Note:** Remember the milk!
|
2
|
+
|
3
|
+
**Attention**: Don't forget the children!
|
4
|
+
|
5
|
+
**Tip:** Look for the warp zone under the bridge.
|
6
|
+
|
7
|
+
**Caution**: Slippery when wet.
|
8
|
+
|
9
|
+
**Warning:** The software you're about to use has not been tested.
|
10
|
+
|
11
|
+
**Important**: Sign off before stepping away from the computer.
|
@@ -0,0 +1 @@
|
|
1
|
+
A paragraph that consists of a single line.
|
@@ -0,0 +1 @@
|
|
1
|
+
A paragraph that consists of a single line.
|
@@ -0,0 +1 @@
|
|
1
|
+
Just a simple paragraph.
|
@@ -0,0 +1 @@
|
|
1
|
+
Just a simple paragraph.
|
@@ -0,0 +1 @@
|
|
1
|
+
= Document Title
|
@@ -0,0 +1 @@
|
|
1
|
+
# Document Title
|
@@ -0,0 +1 @@
|
|
1
|
+
That's all folks!
|
@@ -0,0 +1 @@
|
|
1
|
+
That's all folks!
|
@@ -0,0 +1 @@
|
|
1
|
+
"Give that fan a contract!"
|
@@ -0,0 +1 @@
|
|
1
|
+
"Give that fan a contract!"
|
@@ -0,0 +1 @@
|
|
1
|
+
Accept the terms by typing 'yes' when prompted.
|
@@ -0,0 +1 @@
|
|
1
|
+
Accept the terms by typing 'yes' when prompted.
|
@@ -0,0 +1 @@
|
|
1
|
+
You *really* need to see this.
|
@@ -0,0 +1 @@
|
|
1
|
+
You **really** need to see this.
|
@@ -0,0 +1 @@
|
|
1
|
+
*_This sentence has reached max volume._*
|
@@ -0,0 +1 @@
|
|
1
|
+
***This sentence has reached max volume.***
|
@@ -0,0 +1 @@
|
|
1
|
+
The \<= operator means less than or equal to.
|
@@ -0,0 +1 @@
|
|
1
|
+
The <= operator means less than or equal to.
|
@@ -0,0 +1 @@
|
|
1
|
+
That's all folks!
|
@@ -0,0 +1 @@
|
|
1
|
+
That’s all folks!
|
@@ -0,0 +1 @@
|
|
1
|
+
"`Give that fan a contract!`"
|
@@ -0,0 +1 @@
|
|
1
|
+
“Give that fan a contract!”
|
@@ -0,0 +1 @@
|
|
1
|
+
Once upon a time...
|
@@ -0,0 +1 @@
|
|
1
|
+
Once upon a time…
|
@@ -0,0 +1 @@
|
|
1
|
+
The board -- all 12 members -- voted unanimously to proceed.
|
@@ -0,0 +1 @@
|
|
1
|
+
The board — all 12 members — voted unanimously to proceed.
|
@@ -0,0 +1 @@
|
|
1
|
+
9–5 is the gig.
|
@@ -0,0 +1 @@
|
|
1
|
+
9–5 is the gig.
|
@@ -0,0 +1 @@
|
|
1
|
+
Accept the terms by typing '`yes`' when prompted.
|
@@ -0,0 +1 @@
|
|
1
|
+
Accept the terms by typing ‘yes’ when prompted.
|
@@ -0,0 +1 @@
|
|
1
|
+
It was a dark and story night...
|
@@ -0,0 +1 @@
|
|
1
|
+
It was a dark and story night...
|
@@ -0,0 +1 @@
|
|
1
|
+
The board -- all 12 members -- voted unanimously to proceed.
|
@@ -0,0 +1 @@
|
|
1
|
+
The board --- all 12 members --- voted unanimously to proceed.
|
@@ -0,0 +1 @@
|
|
1
|
+
-h, --help
|
@@ -0,0 +1 @@
|
|
1
|
+
-h, --help
|
@@ -0,0 +1,25 @@
|
|
1
|
+
* Make a new project folder
|
2
|
+
+
|
3
|
+
[source,js]
|
4
|
+
----
|
5
|
+
const fs = require('fs')
|
6
|
+
fs.mkdirSync('project')
|
7
|
+
----
|
8
|
+
|
9
|
+
* Initialize a new repository
|
10
|
+
+
|
11
|
+
[source,js]
|
12
|
+
----
|
13
|
+
const git = require('isomorphic-git')
|
14
|
+
const repo = { fs, dir: 'project' }
|
15
|
+
await git.init(repo)
|
16
|
+
----
|
17
|
+
+
|
18
|
+
This is equivalent to the following commmand:
|
19
|
+
|
20
|
+
$ git init project
|
21
|
+
|
22
|
+
* Create source files
|
23
|
+
+
|
24
|
+
We can't help you here.
|
25
|
+
This part you'll have to do on your own.
|
@@ -0,0 +1,23 @@
|
|
1
|
+
* Make a new project folder
|
2
|
+
|
3
|
+
```js
|
4
|
+
const fs = require('fs')
|
5
|
+
fs.mkdirSync('project')
|
6
|
+
```
|
7
|
+
|
8
|
+
* Initialize a new repository
|
9
|
+
|
10
|
+
```js
|
11
|
+
const git = require('isomorphic-git')
|
12
|
+
const repo = { fs, dir: 'project' }
|
13
|
+
await git.init(repo)
|
14
|
+
```
|
15
|
+
|
16
|
+
This is equivalent to the following commmand:
|
17
|
+
|
18
|
+
$ git init project
|
19
|
+
|
20
|
+
* Create source files
|
21
|
+
|
22
|
+
We can't help you here.
|
23
|
+
This part you'll have to do on your own.
|
@@ -0,0 +1,25 @@
|
|
1
|
+
* Make a new project folder
|
2
|
+
+
|
3
|
+
[source,js]
|
4
|
+
----
|
5
|
+
const fs = require('fs')
|
6
|
+
fs.mkdirSync('project')
|
7
|
+
----
|
8
|
+
|
9
|
+
* Initialize a new repository
|
10
|
+
+
|
11
|
+
[source,js]
|
12
|
+
----
|
13
|
+
const git = require('isomorphic-git')
|
14
|
+
const repo = { fs, dir: 'project' }
|
15
|
+
await git.init(repo)
|
16
|
+
----
|
17
|
+
+
|
18
|
+
This is equivalent to the following commmand:
|
19
|
+
|
20
|
+
$ git init project
|
21
|
+
|
22
|
+
* Create source files
|
23
|
+
+
|
24
|
+
We can't help you here.
|
25
|
+
This part you'll have to do on your own.
|
@@ -0,0 +1,18 @@
|
|
1
|
+
* Make a new project folder
|
2
|
+
```js
|
3
|
+
const fs = require('fs')
|
4
|
+
fs.mkdirSync('project')
|
5
|
+
```
|
6
|
+
* Initialize a new repository
|
7
|
+
```js
|
8
|
+
const git = require('isomorphic-git')
|
9
|
+
const repo = { fs, dir: 'project' }
|
10
|
+
await git.init(repo)
|
11
|
+
```
|
12
|
+
This is equivalent to the following commmand:
|
13
|
+
|
14
|
+
$ git init project
|
15
|
+
* Create source files
|
16
|
+
|
17
|
+
We can't help you here.
|
18
|
+
This part you'll have to do on your own.
|
@@ -0,0 +1 @@
|
|
1
|
+
// This is a line comment
|
@@ -0,0 +1 @@
|
|
1
|
+
<!-- This is a line comment -->
|
@@ -0,0 +1 @@
|
|
1
|
+
// This is a line comment
|
@@ -0,0 +1 @@
|
|
1
|
+
<!-- This is a line comment -->
|