kramdown-asciidoc 1.0.0.alpha.1 → 1.0.0.alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.adoc +33 -0
- data/README.adoc +1 -1
- data/lib/kramdown-asciidoc/converter.rb +96 -32
- data/lib/kramdown-asciidoc/version.rb +1 -1
- data/spec/converter_spec.rb +24 -1
- data/spec/fixtures/a/containing-inline-image.adoc +5 -0
- data/spec/fixtures/a/containing-inline-image.md +5 -0
- data/spec/fixtures/a/double-underscore-in-url.adoc +1 -0
- data/spec/fixtures/a/double-underscore-in-url.md +1 -0
- data/spec/fixtures/codespan/literal.adoc +2 -0
- data/spec/fixtures/codespan/literal.md +2 -0
- data/spec/fixtures/entity/reverse.adoc +2 -0
- data/spec/fixtures/entity/reverse.md +2 -0
- data/spec/fixtures/heading/block-title.adoc +10 -0
- data/spec/fixtures/heading/block-title.md +9 -0
- data/spec/fixtures/heading/not-block-title.adoc +8 -0
- data/spec/fixtures/heading/not-block-title.md +7 -0
- data/spec/fixtures/html_element/admonition.adoc +5 -0
- data/spec/fixtures/html_element/admonition.md +7 -0
- data/spec/fixtures/html_element/img-with-alt-and-width.adoc +1 -0
- data/spec/fixtures/html_element/img-with-alt-and-width.md +1 -0
- data/spec/fixtures/html_element/img-with-width.adoc +1 -0
- data/spec/fixtures/html_element/img-with-width.md +1 -0
- data/spec/fixtures/html_element/img.adoc +2 -0
- data/spec/fixtures/html_element/img.md +1 -0
- data/spec/fixtures/table/cell-with-pipe.adoc +5 -0
- data/spec/fixtures/table/cell-with-pipe.md +1 -0
- data/spec/fixtures/table/single-column-with-header.adoc +6 -0
- data/spec/fixtures/table/single-column-with-header.md +4 -0
- data/spec/fixtures/table/single-column-without-header.adoc +4 -0
- data/spec/fixtures/table/single-column-without-header.md +2 -0
- data/spec/fixtures/text/caret.adoc +1 -0
- data/spec/fixtures/text/caret.md +1 -0
- data/spec/fixtures/xml_comment/above-header.adoc +13 -0
- data/spec/fixtures/xml_comment/above-header.md +16 -0
- metadata +54 -6
- data/spec/fixtures/codeblock/fenced/bash-to-console.adoc +0 -4
- data/spec/fixtures/codeblock/fenced/bash-to-console.md +0 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d272b7da83b441ebdb647887c7d9355fb05eba02b5dd3f01094bc7b089fe2a34
|
|
4
|
+
data.tar.gz: 58f6c5b345bd05e72c06a571b72cdd829766a87a33fa87b3ae0f0d7adab3b3b7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e3f41c1b6a204e64ea4f4baf582910a0b06004dd1fe11676f6b2cb47cca317214c359a86991ba24c133aa18764df6ab1a4b06e9e107eeb31f0085d37d30e3719
|
|
7
|
+
data.tar.gz: 362e0cb506477aae3cf22b57b2be596b573259e6da83e20a0a9cfc62e0c7e63d830760975b2ddd72f360ffb59b07e0e0245dc779289153e17ef5c4af931fb5b7
|
data/CHANGELOG.adoc
CHANGED
|
@@ -5,6 +5,39 @@
|
|
|
5
5
|
This document provides a high-level view of the changes to {project-name} by release.
|
|
6
6
|
For a detailed view of what has changed, refer to the {uri-repo}/commits/master[commit history] on GitHub.
|
|
7
7
|
|
|
8
|
+
== 1.0.0.alpha.2 (2018-05-24) - @mojavelinux
|
|
9
|
+
|
|
10
|
+
=== Added
|
|
11
|
+
|
|
12
|
+
* automatically coerce level 5 heading above codeblock to block title
|
|
13
|
+
* convert HTML-based admonition blocks
|
|
14
|
+
* drop HTML div element if enclosing an image
|
|
15
|
+
* transfer id and class/role attributes to block image
|
|
16
|
+
* pass through width attribute to image if specified on HTML img element
|
|
17
|
+
|
|
18
|
+
=== Changed
|
|
19
|
+
|
|
20
|
+
* don't modify AST when converting
|
|
21
|
+
* transfer comments above document title to document header
|
|
22
|
+
* only process link as image with link if only child
|
|
23
|
+
* escape closing square bracket in contents of link
|
|
24
|
+
* don't add cols attribute to table if table only has a single column
|
|
25
|
+
* don't add blank line between rows if table only has a single column
|
|
26
|
+
* expand \| to |
|
|
27
|
+
* escape pipe in table cell
|
|
28
|
+
* replace ^ with \{caret} in normal text
|
|
29
|
+
* replace double underscore in URL with %5F%5F
|
|
30
|
+
* don't rewrite bash source language as console
|
|
31
|
+
|
|
32
|
+
=== Details
|
|
33
|
+
|
|
34
|
+
{uri-repo}/releases/tag/v1.0.0.alpha.2[git tag] |
|
|
35
|
+
{uri-repo}/compare/v1.0.0.alpha.1...v1.0.0.alpha.2[full diff]
|
|
36
|
+
|
|
8
37
|
== 1.0.0.alpha.1 (2018-05-22) - @mojavelinux
|
|
9
38
|
|
|
10
39
|
Initial release.
|
|
40
|
+
|
|
41
|
+
=== Details
|
|
42
|
+
|
|
43
|
+
{uri-repo}/releases/tag/v1.0.0.alpha.1[git tag]
|
data/README.adoc
CHANGED
|
@@ -27,7 +27,7 @@ module Kramdown; module AsciiDoc
|
|
|
27
27
|
while (line = lines.shift) && line.chomp != '---'
|
|
28
28
|
front_matter << line
|
|
29
29
|
end
|
|
30
|
-
lines.shift while (line = lines[0]) && line
|
|
30
|
+
lines.shift while (line = lines[0]) && line == ?\n
|
|
31
31
|
(::YAML.load front_matter.join).each do |key, val|
|
|
32
32
|
case key
|
|
33
33
|
when 'title'
|
|
@@ -45,7 +45,7 @@ module Kramdown; module AsciiDoc
|
|
|
45
45
|
end
|
|
46
46
|
|
|
47
47
|
class Converter < ::Kramdown::Converter::Base
|
|
48
|
-
RESOLVE_ENTITY_TABLE =
|
|
48
|
+
RESOLVE_ENTITY_TABLE = { 60 => '<', 62 => '>', 124 => '|' }
|
|
49
49
|
ADMON_LABELS = %w(Note Tip Caution Warning Important Attention).map {|l| [l, l] }.to_h
|
|
50
50
|
ADMON_MARKERS = ADMON_LABELS.map {|l, _| %(#{l}: ) }
|
|
51
51
|
ADMON_FORMATTED_MARKERS = ADMON_LABELS.map {|l, _| [%(#{l}:), l] }.to_h
|
|
@@ -98,6 +98,7 @@ module Kramdown; module AsciiDoc
|
|
|
98
98
|
end
|
|
99
99
|
|
|
100
100
|
def convert_root el, opts
|
|
101
|
+
el = extract_prologue el, opts
|
|
101
102
|
body = %(#{inner el, (opts.merge rstrip: true)}#{LF})
|
|
102
103
|
@attributes.each {|k, v| @header << %(:#{k}: #{v}) } unless @attributes.empty?
|
|
103
104
|
@header.empty? ? body : %(#{@header.join LF}#{body == LF ? '' : LFx2}#{body})
|
|
@@ -111,12 +112,19 @@ module Kramdown; module AsciiDoc
|
|
|
111
112
|
result = []
|
|
112
113
|
style = []
|
|
113
114
|
level = el.options[:level]
|
|
114
|
-
|
|
115
|
+
if (discrete = @last_heading_level && level > @last_heading_level + 1)
|
|
116
|
+
# TODO make block title promotion an option (allow certain levels and titles)
|
|
117
|
+
#if ((raw_text = el.options[:raw_text]) == 'Example' || raw_text == 'Examples') &&
|
|
118
|
+
if level == 5 && (next_2_siblings = (siblings = opts[:parent].children).slice (siblings.index el) + 1, 2) &&
|
|
119
|
+
next_2_siblings.any? {|sibling| sibling.type == :codeblock }
|
|
120
|
+
return %(.#{inner el, opts}#{LF})
|
|
121
|
+
end
|
|
122
|
+
style << 'discrete'
|
|
123
|
+
end
|
|
115
124
|
if (id = el.attr['id'])
|
|
116
125
|
style << %(##{id})
|
|
117
126
|
elsif (child_i = el.children[0] || VoidElement).type == :html_element && child_i.value == 'a' && (id = child_i.attr['id'])
|
|
118
|
-
el.children.
|
|
119
|
-
el.children.unshift(*child_i.children) unless child_i.children.empty?
|
|
127
|
+
el = clone el, children: child_i.children + (el.children.drop 1)
|
|
120
128
|
style << %(##{id})
|
|
121
129
|
elsif (role = el.attr['class'])
|
|
122
130
|
style << %(.#{role.tr ' ', '.'})
|
|
@@ -125,7 +133,7 @@ module Kramdown; module AsciiDoc
|
|
|
125
133
|
result << %(#{'=' * level} #{inner el, opts})
|
|
126
134
|
@last_heading_level = level unless discrete
|
|
127
135
|
if level == 1 && opts[:result].empty?
|
|
128
|
-
@header
|
|
136
|
+
@header += result
|
|
129
137
|
nil
|
|
130
138
|
else
|
|
131
139
|
@attributes['doctype'] = 'book' if level == 1
|
|
@@ -149,15 +157,16 @@ module Kramdown; module AsciiDoc
|
|
|
149
157
|
# NOTE detect plain admonition marker (e.g, Note: ...)
|
|
150
158
|
if (child_i = el.children[0] || VoidElement).type == :text && (child_i_text = child_i.value).start_with?(*ADMON_MARKERS)
|
|
151
159
|
marker, child_i_text = child_i_text.split ': ', 2
|
|
152
|
-
child_i
|
|
160
|
+
child_i = clone child_i, value: %(#{ADMON_TYPE_MAP[marker]}: #{child_i_text})
|
|
161
|
+
el = clone el, children: [child_i] + (el.children.drop 1)
|
|
153
162
|
contents = inner el, opts
|
|
154
163
|
# NOTE detect formatted admonition marker (e.g., *Note:* ...)
|
|
155
164
|
elsif (child_i.type == :strong || child_i.type == :em) &&
|
|
156
165
|
(marker_el = child_i.children[0]) && ((marker = ADMON_FORMATTED_MARKERS[marker_el.value]) ||
|
|
157
166
|
((marker = ADMON_LABELS[marker_el.value]) && (child_ii = el.children[1] || VoidElement).type == :text &&
|
|
158
167
|
((child_ii_text = child_ii.value).start_with? ': ')))
|
|
159
|
-
el.children.
|
|
160
|
-
|
|
168
|
+
el = clone el, children: (el.children.drop 1)
|
|
169
|
+
el.children[0] = clone child_ii, value: (child_ii_text.slice 1, child_ii_text.length) if child_ii
|
|
161
170
|
contents = %(#{ADMON_TYPE_MAP[marker]}:#{inner el, opts})
|
|
162
171
|
else
|
|
163
172
|
contents = inner el, opts
|
|
@@ -198,11 +207,11 @@ module Kramdown; module AsciiDoc
|
|
|
198
207
|
contents = el.value.rstrip
|
|
199
208
|
if (lang = el.attr['class'])
|
|
200
209
|
lang = lang.slice 9, lang.length if lang.start_with? 'language-'
|
|
201
|
-
#
|
|
202
|
-
lang = 'console' if lang == 'bash'
|
|
210
|
+
# TODO remap lang if requested
|
|
203
211
|
result << %([source,#{lang}])
|
|
204
212
|
end
|
|
205
213
|
if !lang && (contents.start_with? '$ ')
|
|
214
|
+
# QUESTION should we make these a source,console block?
|
|
206
215
|
if contents.include? LFx2
|
|
207
216
|
result << '....'
|
|
208
217
|
result << contents
|
|
@@ -252,18 +261,22 @@ module Kramdown; module AsciiDoc
|
|
|
252
261
|
container.children.each do |row|
|
|
253
262
|
row_buf = []
|
|
254
263
|
row.children.each do |cell|
|
|
255
|
-
|
|
264
|
+
cell_contents = inner cell, opts
|
|
265
|
+
cell_contents = cell_contents.gsub '|', '\|' if cell_contents.include? '|'
|
|
266
|
+
row_buf << %(| #{cell_contents})
|
|
256
267
|
end
|
|
257
|
-
cols
|
|
268
|
+
cols ||= row_buf.size
|
|
258
269
|
if container.type == :thead
|
|
259
270
|
head = true
|
|
260
271
|
row_buf = [row_buf * ' ']
|
|
272
|
+
row_buf << ''
|
|
273
|
+
elsif cols > 1
|
|
274
|
+
row_buf << ''
|
|
261
275
|
end
|
|
262
|
-
row_buf << ''
|
|
263
276
|
table_buf.concat row_buf
|
|
264
277
|
end
|
|
265
278
|
end
|
|
266
|
-
table_buf.unshift %([cols=#{cols}*]) unless head
|
|
279
|
+
table_buf.unshift %([cols=#{cols}*]) unless head || cols < 2
|
|
267
280
|
table_buf.pop if table_buf[-1] == ''
|
|
268
281
|
table_buf << '|==='
|
|
269
282
|
%(#{table_buf * LF}#{LFx2})
|
|
@@ -274,15 +287,16 @@ module Kramdown; module AsciiDoc
|
|
|
274
287
|
end
|
|
275
288
|
|
|
276
289
|
def convert_text el, opts
|
|
277
|
-
if (
|
|
290
|
+
if (text = el.value).include? '++'
|
|
278
291
|
@attributes['pp'] = '{plus}{plus}'
|
|
279
|
-
|
|
292
|
+
text = text.gsub '++', '{pp}'
|
|
280
293
|
end
|
|
281
|
-
|
|
282
|
-
if
|
|
283
|
-
|
|
294
|
+
text = text.gsub '^', '{caret}' if (text.include? '^') && text != '^'
|
|
295
|
+
text = text.gsub '<=', '\<=' if text.include? '<='
|
|
296
|
+
if text.ascii_only?
|
|
297
|
+
text
|
|
284
298
|
else
|
|
285
|
-
(
|
|
299
|
+
(text.gsub ApostropheRx, ?').gsub TypographicSymbolRx, TYPOGRAPHIC_SYMBOL_TO_MARKUP
|
|
286
300
|
end
|
|
287
301
|
end
|
|
288
302
|
|
|
@@ -316,34 +330,56 @@ module Kramdown; module AsciiDoc
|
|
|
316
330
|
end
|
|
317
331
|
|
|
318
332
|
def convert_entity el, opts
|
|
319
|
-
RESOLVE_ENTITY_TABLE[el.value] || el.options[:original]
|
|
333
|
+
RESOLVE_ENTITY_TABLE[el.value.code_point] || el.options[:original]
|
|
320
334
|
end
|
|
321
335
|
|
|
322
336
|
def convert_a el, opts
|
|
323
337
|
if (url = el.attr['href']).start_with? '#'
|
|
324
338
|
%(<<#{url.slice 1, url.length},#{inner el, opts}>>)
|
|
325
339
|
elsif url.start_with? 'https://', 'http://'
|
|
326
|
-
if (child_i = el.children[0]
|
|
340
|
+
if (children = el.children).size == 1 && (child_i = el.children[0]).type == :img
|
|
327
341
|
convert_img child_i, parent: opts[:parent], index: 0, url: url
|
|
328
342
|
else
|
|
329
|
-
((contents = inner el, opts).chomp '/') == (url.chomp '/')
|
|
343
|
+
bare = ((contents = inner el, opts).chomp '/') == (url.chomp '/')
|
|
344
|
+
url = url.gsub '__', '%5F%5F' if (url.include? '__')
|
|
345
|
+
bare ? url : %(#{url}[#{contents.gsub ']', '\]'}])
|
|
330
346
|
end
|
|
331
347
|
elsif url.end_with? '.md'
|
|
332
|
-
%(xref:#{url.slice 0, url.length - 3}.adoc[#{inner el, opts}])
|
|
348
|
+
%(xref:#{url.slice 0, url.length - 3}.adoc[#{(inner el, opts).gsub ']', '\]'}])
|
|
333
349
|
else
|
|
334
|
-
%(link:#{url}[#{inner el, opts}])
|
|
350
|
+
%(link:#{url}[#{(inner el, opts).gsub ']', '\]'}])
|
|
335
351
|
end
|
|
336
352
|
end
|
|
337
353
|
|
|
338
354
|
def convert_img el, opts
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
355
|
+
if !(parent = opts[:parent]) || parent.type == :p && parent.children.size == 1
|
|
356
|
+
style = []
|
|
357
|
+
if (id = el.attr['id'])
|
|
358
|
+
style << %(##{id})
|
|
359
|
+
end
|
|
360
|
+
if (role = el.attr['class'])
|
|
361
|
+
style << %(.#{role.tr ' ', '.'})
|
|
362
|
+
end
|
|
363
|
+
macro_prefix = style.empty? ? 'image::' : ([%([#{style.join}]), 'image::'].join LF)
|
|
364
|
+
else
|
|
365
|
+
macro_prefix = 'image:'
|
|
366
|
+
end
|
|
367
|
+
macro_attrs = []
|
|
368
|
+
if (alt_text = el.attr['alt'])
|
|
369
|
+
macro_attrs << alt_text unless alt_text.empty?
|
|
370
|
+
end
|
|
371
|
+
if (width = el.attr['width'])
|
|
372
|
+
macro_attrs << '' if macro_attrs.empty?
|
|
373
|
+
macro_attrs << width
|
|
374
|
+
end
|
|
375
|
+
if (url = opts[:url])
|
|
376
|
+
macro_attrs << %(link=#{url})
|
|
377
|
+
end
|
|
342
378
|
src = el.attr['src']
|
|
343
379
|
if (imagesdir = @imagesdir) && (src.start_with? %(#{imagesdir}/))
|
|
344
380
|
src = src.slice imagesdir.length + 1, src.length
|
|
345
381
|
end
|
|
346
|
-
%(#{
|
|
382
|
+
%(#{macro_prefix}#{src}[#{macro_attrs.join ','}])
|
|
347
383
|
end
|
|
348
384
|
|
|
349
385
|
# NOTE leave enabled so we can down-convert mdash to --
|
|
@@ -352,9 +388,20 @@ module Kramdown; module AsciiDoc
|
|
|
352
388
|
end
|
|
353
389
|
|
|
354
390
|
def convert_html_element el, opts
|
|
391
|
+
if (tagname = el.value) == 'div' && (child_i = el.children[0]) && child_i.options[:transparent] &&
|
|
392
|
+
(child_i_i = child_i.children[0])
|
|
393
|
+
if child_i_i.type == :img
|
|
394
|
+
return convert_img child_i_i, (opts.merge parent: child_i, index: 0) if child_i.children.size == 1
|
|
395
|
+
elsif child_i_i.value == 'span' && ((role = el.attr['class'] || '').start_with? 'note') &&
|
|
396
|
+
child_i_i.attr['class'] == 'notetitle'
|
|
397
|
+
marker = ADMON_FORMATTED_MARKERS[(child_i_i.children[0] || VoidElement).value] || 'Note'
|
|
398
|
+
(el = child_i.dup).children = el.children.drop 1
|
|
399
|
+
return %(#{ADMON_TYPE_MAP[marker]}:#{inner el, opts}#{LFx2})
|
|
400
|
+
end
|
|
401
|
+
end
|
|
355
402
|
contents = inner el, (opts.merge rstrip: el.options[:category] == :block)
|
|
356
403
|
attrs = (attrs = el.attr).empty? ? '' : attrs.map {|k, v| %( #{k}="#{v}") }.join
|
|
357
|
-
case
|
|
404
|
+
case tagname
|
|
358
405
|
when 'sup'
|
|
359
406
|
%(^#{contents}^)
|
|
360
407
|
when 'sub'
|
|
@@ -397,7 +444,16 @@ module Kramdown; module AsciiDoc
|
|
|
397
444
|
end
|
|
398
445
|
end
|
|
399
446
|
|
|
400
|
-
def
|
|
447
|
+
def extract_prologue el, opts
|
|
448
|
+
if (child_i = (children = el.children)[0] || VoidElement).type == :xml_comment
|
|
449
|
+
(prologue_el = el.dup).children = children.take_while {|child| child.type == :xml_comment || child.type == :blank }
|
|
450
|
+
(el = el.dup).children = children.drop prologue_el.children.size
|
|
451
|
+
@header += [%(#{inner prologue_el, (opts.merge rstrip: true)})]
|
|
452
|
+
end
|
|
453
|
+
el
|
|
454
|
+
end
|
|
455
|
+
|
|
456
|
+
def inner el, opts = {}
|
|
401
457
|
rstrip = opts.delete :rstrip
|
|
402
458
|
result = []
|
|
403
459
|
prev = nil
|
|
@@ -407,6 +463,14 @@ module Kramdown; module AsciiDoc
|
|
|
407
463
|
end
|
|
408
464
|
rstrip ? result.join.rstrip : result.join
|
|
409
465
|
end
|
|
466
|
+
|
|
467
|
+
def clone el, properties = {}
|
|
468
|
+
el = el.dup
|
|
469
|
+
properties.each do |name, value|
|
|
470
|
+
el.send %(#{name}=).to_sym, value
|
|
471
|
+
end
|
|
472
|
+
el
|
|
473
|
+
end
|
|
410
474
|
end
|
|
411
475
|
end; end
|
|
412
476
|
|
data/spec/converter_spec.rb
CHANGED
|
@@ -4,16 +4,39 @@ describe Kramdown::AsciiDoc::Converter do
|
|
|
4
4
|
let(:opts) { Kramdown::AsciiDoc::DEFAULT_PARSER_OPTS }
|
|
5
5
|
let(:doc) { Kramdown::Document.new input, opts }
|
|
6
6
|
let(:root) { doc.root }
|
|
7
|
+
let(:converter) { described_class.send :new, root, {} }
|
|
7
8
|
|
|
8
9
|
context '#convert' do
|
|
9
10
|
let (:input) { %(# Document Title\n\nBody text.) }
|
|
10
11
|
it 'adds line feed (EOL) to end of output document' do
|
|
11
|
-
converter = described_class.send :new, root, {}
|
|
12
12
|
(expect converter.convert root).to end_with %(\n)
|
|
13
13
|
(expect doc.to_asciidoc).to end_with %(\n)
|
|
14
14
|
end
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
+
context '#clone' do
|
|
18
|
+
let :input do
|
|
19
|
+
<<~EOS
|
|
20
|
+
## <a id="anchor-name">Heading Title</a>
|
|
21
|
+
|
|
22
|
+
Note: Be mindful.
|
|
23
|
+
|
|
24
|
+
*Important*: Turn off the lights.
|
|
25
|
+
EOS
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
it 'does not modify the AST when converting' do
|
|
29
|
+
doc.to_asciidoc
|
|
30
|
+
heading = root.children[0]
|
|
31
|
+
(expect heading.children[0].type).to be :html_element
|
|
32
|
+
(expect heading.children[0].value).to eql 'a'
|
|
33
|
+
para_i = root.children[2]
|
|
34
|
+
(expect para_i.children[0].value).to start_with 'Note: '
|
|
35
|
+
para_ii = root.children[4]
|
|
36
|
+
(expect para_ii.children[0].type).to be :em
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
17
40
|
context '.replace_toc' do
|
|
18
41
|
it 'does not modify source if TOC directive not detected' do
|
|
19
42
|
input = <<~EOS
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
See the https://example.com/compatibility.html#feature-matrix%5F%5Fproduct_a[compatibility feature matrix for product A].
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
See the [compatibility feature matrix for product A](https://example.com/compatibility.html#feature-matrix__product_a).
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Main instructions.
|
|
2
|
+
|
|
3
|
+
<div class="note note"><span class="notetitle">Attention:</span> For the configuration changes to take effect,
|
|
4
|
+
the server must be restarted using the <a href="restart-api.html">Restart API</a>.
|
|
5
|
+
</div>
|
|
6
|
+
|
|
7
|
+
Now back to our regularly scheduled program.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
image::logo.png[Project,480]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<img src="logo.png" alt="Project" width="480">
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
image::logo.png[,480]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<img src="logo.png" width="480">
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<div><img id="img-add-new-user" class="image" src="add-new-user.png" alt="Add New User"/></div>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
| a\|b | c\|d |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Current mood: {caret}_{caret}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Current mood: ^_^
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kramdown-asciidoc
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.0.alpha.
|
|
4
|
+
version: 1.0.0.alpha.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dan Allen
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-05-
|
|
11
|
+
date: 2018-05-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: kramdown
|
|
@@ -87,6 +87,10 @@ files:
|
|
|
87
87
|
- spec/converter_spec.rb
|
|
88
88
|
- spec/fixtures/a/bare-url.adoc
|
|
89
89
|
- spec/fixtures/a/bare-url.md
|
|
90
|
+
- spec/fixtures/a/containing-inline-image.adoc
|
|
91
|
+
- spec/fixtures/a/containing-inline-image.md
|
|
92
|
+
- spec/fixtures/a/double-underscore-in-url.adoc
|
|
93
|
+
- spec/fixtures/a/double-underscore-in-url.md
|
|
90
94
|
- spec/fixtures/a/interdoc-xref.adoc
|
|
91
95
|
- spec/fixtures/a/interdoc-xref.md
|
|
92
96
|
- spec/fixtures/a/internal.adoc
|
|
@@ -117,8 +121,6 @@ files:
|
|
|
117
121
|
- spec/fixtures/br/trailing-double-space.md
|
|
118
122
|
- spec/fixtures/codeblock/contiguous-lines.adoc
|
|
119
123
|
- spec/fixtures/codeblock/contiguous-lines.md
|
|
120
|
-
- spec/fixtures/codeblock/fenced/bash-to-console.adoc
|
|
121
|
-
- spec/fixtures/codeblock/fenced/bash-to-console.md
|
|
122
124
|
- spec/fixtures/codeblock/fenced/with-command-prompt.adoc
|
|
123
125
|
- spec/fixtures/codeblock/fenced/with-command-prompt.md
|
|
124
126
|
- spec/fixtures/codeblock/fenced/with-language.adoc
|
|
@@ -145,6 +147,10 @@ files:
|
|
|
145
147
|
- spec/fixtures/entity/numeric.md
|
|
146
148
|
- spec/fixtures/entity/reverse.adoc
|
|
147
149
|
- spec/fixtures/entity/reverse.md
|
|
150
|
+
- spec/fixtures/heading/block-title.adoc
|
|
151
|
+
- spec/fixtures/heading/block-title.md
|
|
152
|
+
- spec/fixtures/heading/not-block-title.adoc
|
|
153
|
+
- spec/fixtures/heading/not-block-title.md
|
|
148
154
|
- spec/fixtures/heading/out-of-sequence.adoc
|
|
149
155
|
- spec/fixtures/heading/out-of-sequence.md
|
|
150
156
|
- spec/fixtures/heading/outline.adoc
|
|
@@ -159,10 +165,18 @@ files:
|
|
|
159
165
|
- spec/fixtures/hr/dashes.md
|
|
160
166
|
- spec/fixtures/html_element/abbr.adoc
|
|
161
167
|
- spec/fixtures/html_element/abbr.md
|
|
168
|
+
- spec/fixtures/html_element/admonition.adoc
|
|
169
|
+
- spec/fixtures/html_element/admonition.md
|
|
162
170
|
- spec/fixtures/html_element/heading-with-class.adoc
|
|
163
171
|
- spec/fixtures/html_element/heading-with-class.md
|
|
164
172
|
- spec/fixtures/html_element/heading-with-id.adoc
|
|
165
173
|
- spec/fixtures/html_element/heading-with-id.md
|
|
174
|
+
- spec/fixtures/html_element/img-with-alt-and-width.adoc
|
|
175
|
+
- spec/fixtures/html_element/img-with-alt-and-width.md
|
|
176
|
+
- spec/fixtures/html_element/img-with-width.adoc
|
|
177
|
+
- spec/fixtures/html_element/img-with-width.md
|
|
178
|
+
- spec/fixtures/html_element/img.adoc
|
|
179
|
+
- spec/fixtures/html_element/img.md
|
|
166
180
|
- spec/fixtures/html_element/native.adoc
|
|
167
181
|
- spec/fixtures/html_element/native.md
|
|
168
182
|
- spec/fixtures/html_element/sub.adoc
|
|
@@ -239,10 +253,18 @@ files:
|
|
|
239
253
|
- spec/fixtures/strong/constrained.md
|
|
240
254
|
- spec/fixtures/strong/nested-emphasis.adoc
|
|
241
255
|
- spec/fixtures/strong/nested-emphasis.md
|
|
256
|
+
- spec/fixtures/table/cell-with-pipe.adoc
|
|
257
|
+
- spec/fixtures/table/cell-with-pipe.md
|
|
258
|
+
- spec/fixtures/table/single-column-with-header.adoc
|
|
259
|
+
- spec/fixtures/table/single-column-with-header.md
|
|
260
|
+
- spec/fixtures/table/single-column-without-header.adoc
|
|
261
|
+
- spec/fixtures/table/single-column-without-header.md
|
|
242
262
|
- spec/fixtures/table/with-header.adoc
|
|
243
263
|
- spec/fixtures/table/with-header.md
|
|
244
264
|
- spec/fixtures/table/without-header.adoc
|
|
245
265
|
- spec/fixtures/table/without-header.md
|
|
266
|
+
- spec/fixtures/text/caret.adoc
|
|
267
|
+
- spec/fixtures/text/caret.md
|
|
246
268
|
- spec/fixtures/text/lte.adoc
|
|
247
269
|
- spec/fixtures/text/lte.md
|
|
248
270
|
- spec/fixtures/text/plus-plus.adoc
|
|
@@ -277,6 +299,8 @@ files:
|
|
|
277
299
|
- spec/fixtures/ul/simple-separated.md
|
|
278
300
|
- spec/fixtures/ul/simple.adoc
|
|
279
301
|
- spec/fixtures/ul/simple.md
|
|
302
|
+
- spec/fixtures/xml_comment/above-header.adoc
|
|
303
|
+
- spec/fixtures/xml_comment/above-header.md
|
|
280
304
|
- spec/fixtures/xml_comment/block.adoc
|
|
281
305
|
- spec/fixtures/xml_comment/block.md
|
|
282
306
|
- spec/fixtures/xml_comment/line-offset-by-space.adoc
|
|
@@ -325,6 +349,10 @@ test_files:
|
|
|
325
349
|
- spec/converter_spec.rb
|
|
326
350
|
- spec/fixtures/a/bare-url.adoc
|
|
327
351
|
- spec/fixtures/a/bare-url.md
|
|
352
|
+
- spec/fixtures/a/containing-inline-image.adoc
|
|
353
|
+
- spec/fixtures/a/containing-inline-image.md
|
|
354
|
+
- spec/fixtures/a/double-underscore-in-url.adoc
|
|
355
|
+
- spec/fixtures/a/double-underscore-in-url.md
|
|
328
356
|
- spec/fixtures/a/interdoc-xref.adoc
|
|
329
357
|
- spec/fixtures/a/interdoc-xref.md
|
|
330
358
|
- spec/fixtures/a/internal.adoc
|
|
@@ -355,8 +383,6 @@ test_files:
|
|
|
355
383
|
- spec/fixtures/br/trailing-double-space.md
|
|
356
384
|
- spec/fixtures/codeblock/contiguous-lines.adoc
|
|
357
385
|
- spec/fixtures/codeblock/contiguous-lines.md
|
|
358
|
-
- spec/fixtures/codeblock/fenced/bash-to-console.adoc
|
|
359
|
-
- spec/fixtures/codeblock/fenced/bash-to-console.md
|
|
360
386
|
- spec/fixtures/codeblock/fenced/with-command-prompt.adoc
|
|
361
387
|
- spec/fixtures/codeblock/fenced/with-command-prompt.md
|
|
362
388
|
- spec/fixtures/codeblock/fenced/with-language.adoc
|
|
@@ -383,6 +409,10 @@ test_files:
|
|
|
383
409
|
- spec/fixtures/entity/numeric.md
|
|
384
410
|
- spec/fixtures/entity/reverse.adoc
|
|
385
411
|
- spec/fixtures/entity/reverse.md
|
|
412
|
+
- spec/fixtures/heading/block-title.adoc
|
|
413
|
+
- spec/fixtures/heading/block-title.md
|
|
414
|
+
- spec/fixtures/heading/not-block-title.adoc
|
|
415
|
+
- spec/fixtures/heading/not-block-title.md
|
|
386
416
|
- spec/fixtures/heading/out-of-sequence.adoc
|
|
387
417
|
- spec/fixtures/heading/out-of-sequence.md
|
|
388
418
|
- spec/fixtures/heading/outline.adoc
|
|
@@ -397,10 +427,18 @@ test_files:
|
|
|
397
427
|
- spec/fixtures/hr/dashes.md
|
|
398
428
|
- spec/fixtures/html_element/abbr.adoc
|
|
399
429
|
- spec/fixtures/html_element/abbr.md
|
|
430
|
+
- spec/fixtures/html_element/admonition.adoc
|
|
431
|
+
- spec/fixtures/html_element/admonition.md
|
|
400
432
|
- spec/fixtures/html_element/heading-with-class.adoc
|
|
401
433
|
- spec/fixtures/html_element/heading-with-class.md
|
|
402
434
|
- spec/fixtures/html_element/heading-with-id.adoc
|
|
403
435
|
- spec/fixtures/html_element/heading-with-id.md
|
|
436
|
+
- spec/fixtures/html_element/img-with-alt-and-width.adoc
|
|
437
|
+
- spec/fixtures/html_element/img-with-alt-and-width.md
|
|
438
|
+
- spec/fixtures/html_element/img-with-width.adoc
|
|
439
|
+
- spec/fixtures/html_element/img-with-width.md
|
|
440
|
+
- spec/fixtures/html_element/img.adoc
|
|
441
|
+
- spec/fixtures/html_element/img.md
|
|
404
442
|
- spec/fixtures/html_element/native.adoc
|
|
405
443
|
- spec/fixtures/html_element/native.md
|
|
406
444
|
- spec/fixtures/html_element/sub.adoc
|
|
@@ -477,10 +515,18 @@ test_files:
|
|
|
477
515
|
- spec/fixtures/strong/constrained.md
|
|
478
516
|
- spec/fixtures/strong/nested-emphasis.adoc
|
|
479
517
|
- spec/fixtures/strong/nested-emphasis.md
|
|
518
|
+
- spec/fixtures/table/cell-with-pipe.adoc
|
|
519
|
+
- spec/fixtures/table/cell-with-pipe.md
|
|
520
|
+
- spec/fixtures/table/single-column-with-header.adoc
|
|
521
|
+
- spec/fixtures/table/single-column-with-header.md
|
|
522
|
+
- spec/fixtures/table/single-column-without-header.adoc
|
|
523
|
+
- spec/fixtures/table/single-column-without-header.md
|
|
480
524
|
- spec/fixtures/table/with-header.adoc
|
|
481
525
|
- spec/fixtures/table/with-header.md
|
|
482
526
|
- spec/fixtures/table/without-header.adoc
|
|
483
527
|
- spec/fixtures/table/without-header.md
|
|
528
|
+
- spec/fixtures/text/caret.adoc
|
|
529
|
+
- spec/fixtures/text/caret.md
|
|
484
530
|
- spec/fixtures/text/lte.adoc
|
|
485
531
|
- spec/fixtures/text/lte.md
|
|
486
532
|
- spec/fixtures/text/plus-plus.adoc
|
|
@@ -515,6 +561,8 @@ test_files:
|
|
|
515
561
|
- spec/fixtures/ul/simple-separated.md
|
|
516
562
|
- spec/fixtures/ul/simple.adoc
|
|
517
563
|
- spec/fixtures/ul/simple.md
|
|
564
|
+
- spec/fixtures/xml_comment/above-header.adoc
|
|
565
|
+
- spec/fixtures/xml_comment/above-header.md
|
|
518
566
|
- spec/fixtures/xml_comment/block.adoc
|
|
519
567
|
- spec/fixtures/xml_comment/block.md
|
|
520
568
|
- spec/fixtures/xml_comment/line-offset-by-space.adoc
|