kramdown-asciidoc 1.0.0.alpha.10 → 1.0.0.alpha.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.adoc +19 -0
  3. data/README.adoc +4 -1
  4. data/lib/kramdown-asciidoc/api.rb +27 -0
  5. data/lib/kramdown-asciidoc/cli.rb +14 -22
  6. data/lib/kramdown-asciidoc/converter.rb +62 -33
  7. data/lib/kramdown-asciidoc/kramdown_ext/parser/html.rb +9 -0
  8. data/lib/kramdown-asciidoc/version.rb +1 -1
  9. data/lib/kramdown-asciidoc/writer.rb +3 -3
  10. data/lib/kramdown-asciidoc.rb +3 -9
  11. data/spec/api_spec.rb +63 -0
  12. data/spec/cli_spec.rb +1 -2
  13. data/spec/converter_spec.rb +5 -5
  14. data/spec/scenario_spec.rb +1 -1
  15. data/spec/scenarios/blockquote/attribution-separated.md +1 -0
  16. data/spec/scenarios/blockquote/{with-attribution.adoc → attribution.adoc} +0 -0
  17. data/spec/scenarios/blockquote/{with-attribution.md → attribution.md} +0 -0
  18. data/spec/scenarios/codeblock/{fenced/with-command-prompt.adoc → command-prompt.adoc} +0 -0
  19. data/spec/scenarios/codeblock/{with-command-prompt.md → command-prompt.md} +0 -0
  20. data/spec/scenarios/codeblock/{with-command-prompt.adoc → fenced/command-prompt.adoc} +0 -0
  21. data/spec/scenarios/codeblock/fenced/{with-command-prompt.md → command-prompt.md} +0 -0
  22. data/spec/scenarios/codeblock/fenced/{with-language.adoc → language.adoc} +0 -0
  23. data/spec/scenarios/codeblock/fenced/{with-language.md → language.md} +0 -0
  24. data/spec/scenarios/codeblock/fenced/{with-non-contiguous-command-prompts.adoc → non-contiguous-command-prompts.adoc} +0 -0
  25. data/spec/scenarios/codeblock/fenced/{with-non-contiguous-command-prompts.md → non-contiguous-command-prompts.md} +0 -0
  26. data/spec/scenarios/codeblock/{with-non-contiguous-command-prompts.adoc → non-contiguous-command-prompts.adoc} +0 -0
  27. data/spec/scenarios/codeblock/{with-non-contiguous-command-prompts.md → non-contiguous-command-prompts.md} +0 -0
  28. data/spec/scenarios/codespan/caret.adoc +1 -0
  29. data/spec/scenarios/codespan/caret.md +1 -0
  30. data/spec/scenarios/codespan/possessive.adoc +3 -0
  31. data/spec/scenarios/codespan/possessive.md +3 -0
  32. data/spec/scenarios/codespan/quoted.adoc +1 -0
  33. data/spec/scenarios/codespan/quoted.md +1 -0
  34. data/spec/scenarios/codespan/smart-quotes.adoc +1 -0
  35. data/spec/scenarios/codespan/smart-quotes.md +1 -0
  36. data/spec/scenarios/codespan/unconstrained.adoc +1 -0
  37. data/spec/scenarios/codespan/unconstrained.md +1 -0
  38. data/spec/scenarios/heading/auto-id-prefix.adoc +11 -0
  39. data/spec/scenarios/heading/auto-id-prefix.md +7 -0
  40. data/spec/scenarios/heading/auto-id-prefix.opts +2 -0
  41. data/spec/scenarios/heading/auto-ids.adoc +1 -1
  42. data/spec/scenarios/heading/auto-ids.md +1 -1
  43. data/spec/scenarios/heading/{with-formatting.adoc → formatting.adoc} +0 -0
  44. data/spec/scenarios/heading/{with-formatting.md → formatting.md} +0 -0
  45. data/spec/scenarios/heading/{with-anchor.adoc → leading-anchor.adoc} +0 -0
  46. data/spec/scenarios/heading/leading-anchor.md +1 -0
  47. data/spec/scenarios/heading/surrounding-anchor.adoc +2 -0
  48. data/spec/scenarios/heading/{with-anchor.md → surrounding-anchor.md} +0 -0
  49. data/spec/scenarios/html_element/div-mixed.adoc +1 -0
  50. data/spec/scenarios/html_element/div-mixed.md +4 -0
  51. data/spec/scenarios/html_element/div-text-only.adoc +1 -0
  52. data/spec/scenarios/html_element/div-text-only.md +1 -0
  53. data/spec/scenarios/html_element/mark.adoc +1 -0
  54. data/spec/scenarios/html_element/mark.md +1 -0
  55. data/spec/scenarios/html_element/span.adoc +3 -0
  56. data/spec/scenarios/html_element/span.md +3 -0
  57. data/spec/scenarios/html_element/unrecognized-admonition.adoc +5 -0
  58. data/spec/scenarios/html_element/unrecognized-admonition.md +5 -0
  59. data/spec/scenarios/p/admonition/label-only.adoc +1 -0
  60. data/spec/scenarios/p/admonition/label-only.md +1 -0
  61. data/spec/scenarios/table/{with-header.adoc → header.adoc} +0 -0
  62. data/spec/scenarios/table/{with-header.md → header.md} +0 -0
  63. data/spec/scenarios/table/{without-header.adoc → no-header.adoc} +0 -0
  64. data/spec/scenarios/table/{without-header.md → no-header.md} +0 -0
  65. data/spec/scenarios/wrap/ventilate-with-comments.adoc +5 -0
  66. data/spec/scenarios/wrap/ventilate-with-comments.md +5 -0
  67. data/spec/scenarios/wrap/ventilate-with-comments.opts +1 -0
  68. data/spec/scenarios/xml_comment/above-block.adoc +7 -0
  69. data/spec/scenarios/xml_comment/above-block.md +5 -0
  70. data/spec/scenarios/xml_comment/line-empty.adoc +7 -0
  71. data/spec/scenarios/xml_comment/line-empty.md +9 -0
  72. data/spec/scenarios/xml_comment/multiline-span.adoc +4 -0
  73. data/spec/scenarios/xml_comment/multiline-span.md +4 -0
  74. data/spec/scenarios/xml_comment/p-separator.adoc +5 -0
  75. data/spec/scenarios/xml_comment/p-separator.md +5 -0
  76. data/spec/scenarios/xml_comment/surrounded-by-spaces.adoc +3 -0
  77. data/spec/scenarios/xml_comment/surrounded-by-spaces.md +1 -0
  78. data/spec/spec_helper.rb +1 -0
  79. metadata +118 -42
@@ -2,5 +2,6 @@ It will be ``npm install``ed (or ``yarn``ed) into `node_modules`.
2
2
  Then just run `lerna`--the base command.
3
3
  You can re``link`` all related packages using ``lerna``'s `link` command.
4
4
  "``foo`` `bar`"
5
+ "``foo`` ``bar``"
5
6
  so `mono` man
6
7
  `x`>``y``<``z``
@@ -2,5 +2,6 @@ It will be `npm install`ed (or `yarn`ed) into `node_modules`.
2
2
  Then just run `lerna`--the base command.
3
3
  You can re`link` all related packages using `lerna`'s `link` command.
4
4
  &quot;`foo` `bar`&quot;
5
+ "`foo` `bar`"
5
6
  so ``` mono ``` man
6
7
  `x`>`y`<`z`
@@ -0,0 +1,11 @@
1
+ [#id-heading-1]
2
+ = Heading 1
3
+
4
+ [#id-heading-2]
5
+ == Heading 2
6
+
7
+ [#id-heading-3]
8
+ === Heading 3
9
+
10
+ [#id-back-to-heading-2]
11
+ == Back to Heading 2
@@ -0,0 +1,7 @@
1
+ # Heading 1
2
+
3
+ ## Heading 2
4
+
5
+ ### Heading 3
6
+
7
+ ## Back to Heading 2
@@ -0,0 +1,2 @@
1
+ :auto_id_prefix: id-
2
+ :auto_ids: true
@@ -4,7 +4,7 @@
4
4
  [#heading-2]
5
5
  == Heading 2
6
6
 
7
- [#heading-3]
7
+ [#explicit-id]
8
8
  === Heading 3
9
9
 
10
10
  [#back-to-heading-2]
@@ -2,6 +2,6 @@
2
2
 
3
3
  ## Heading 2
4
4
 
5
- ### Heading 3
5
+ ### <a id="explicit-id"></a>Heading 3
6
6
 
7
7
  ## Back to Heading 2
@@ -0,0 +1 @@
1
+ ## <a id="env"></a>Environment
@@ -0,0 +1,2 @@
1
+ [#env]
2
+ == Environment
@@ -0,0 +1 @@
1
+ Being able to write in AsciiDoc instead of Markdown, *priceless*.
@@ -0,0 +1,4 @@
1
+ <div>
2
+ Being able to write in AsciiDoc instead of Markdown,
3
+ <b>priceless</b>.
4
+ </div>
@@ -0,0 +1 @@
1
+ Just a lonely div.
@@ -0,0 +1 @@
1
+ <div>Just a lonely div.</div>
@@ -0,0 +1 @@
1
+ If you want to draw attention to text, #highlight# it.
@@ -0,0 +1 @@
1
+ If you want to draw attention to text, <mark>highlight</mark> it.
@@ -0,0 +1,3 @@
1
+ vanilla phrase
2
+
3
+ [.term]#term#
@@ -0,0 +1,3 @@
1
+ <span>vanilla phrase</span>
2
+
3
+ <span class="term">term</span>
@@ -0,0 +1,5 @@
1
+ Text you should read.
2
+
3
+ NOTE: Text you might read.
4
+
5
+ More text you should read.
@@ -0,0 +1,5 @@
1
+ Text you should read.
2
+
3
+ <div class="note"><span class="notetitle">Shazam:</span> Text you might read.</div>
4
+
5
+ More text you should read.
@@ -0,0 +1 @@
1
+ _Note_
@@ -0,0 +1 @@
1
+ *Note*
File without changes
@@ -0,0 +1,5 @@
1
+ I am text that has succumbed to the
2
+ // note to self
3
+ hard wrapping of a text editor and therefore hard to edit.
4
+ Ventilate me to set me free from this tyranny.
5
+ // end of thought
@@ -0,0 +1,5 @@
1
+ I am text that has succumbed to the
2
+ <!-- note to self -->hard wrapping of a text editor and
3
+ therefore hard to edit. Ventilate me
4
+ to set me free from this tyranny.
5
+ <!-- end of thought -->
@@ -0,0 +1 @@
1
+ :wrap: :ventilate
@@ -0,0 +1,7 @@
1
+ // rework this paragraph
2
+
3
+ A paragraph in need of revision.
4
+
5
+ // also needs work
6
+
7
+ Another shoddy paragraph.
@@ -0,0 +1,5 @@
1
+ <!-- rework this paragraph -->
2
+ A paragraph in need of revision.
3
+
4
+ <!-- also needs work -->
5
+ Another shoddy paragraph.
@@ -0,0 +1,7 @@
1
+ * domain
2
+ +
3
+ x-axis
4
+
5
+ * range
6
+ +
7
+ y-axis
@@ -0,0 +1,9 @@
1
+ * domain
2
+ <!---->
3
+
4
+ x-axis
5
+
6
+ * range
7
+ <!---->
8
+
9
+ y-axis
@@ -2,3 +2,7 @@ some text
2
2
  // a comment that goes on
3
3
  // and on
4
4
  // and on
5
+
6
+ pro tip
7
+ // really just
8
+ // a normal tip
@@ -1,3 +1,7 @@
1
1
  some text <!-- a comment that goes on
2
2
  and on
3
3
  and on -->
4
+
5
+ pro tip
6
+ <!-- really just
7
+ a normal tip -->
@@ -0,0 +1,5 @@
1
+ Just as it begins.
2
+
3
+ //
4
+
5
+ So it must end.
@@ -0,0 +1,5 @@
1
+ Just as it begins.
2
+
3
+ <!-- -->
4
+
5
+ So it must end.
@@ -0,0 +1,3 @@
1
+ foo
2
+ // bar
3
+ baz
@@ -0,0 +1 @@
1
+ foo <!-- bar --> baz
data/spec/spec_helper.rb CHANGED
@@ -9,6 +9,7 @@ end
9
9
 
10
10
  require 'kramdown-asciidoc'
11
11
  require 'fileutils'
12
+ autoload :StringIO, 'stringio'
12
13
 
13
14
  RSpec.configure do |config|
14
15
  config.after :suite do