Skip to content

Commit

Permalink
resolves #2947 add single and double role hint to <quote> tag in DocB…
Browse files Browse the repository at this point in the history
…ook output (PR #4443)
  • Loading branch information
mojavelinux committed Apr 27, 2023
1 parent 8baf1e3 commit 2320fc3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ Improvements::
* Don't split value of `-r` CLI option; treat as single path (#4425)
* Don't uppercase monospace span in section title in manpage output (#4402)
* Simplify processing of implicit link (i.e., autolink) by separating implicit and explicit match
* Add single and double role hint to `<quote>` tag in DocBook output (#2947)

Bug Fixes::

Expand Down
4 changes: 2 additions & 2 deletions lib/asciidoctor/converter/docbook5.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class Converter::DocBook5Converter < Converter::Base
monospaced: ['<literal>', '</literal>'],
emphasis: ['<emphasis>', '</emphasis>', true],
strong: ['<emphasis role="strong">', '</emphasis>', true],
double: ['<quote>', '</quote>', true],
single: ['<quote>', '</quote>', true],
double: ['<quote role="double">', '</quote>', true],
single: ['<quote role="single">', '</quote>', true],
mark: ['<emphasis role="marked">', '</emphasis>'],
superscript: ['<superscript>', '</superscript>'],
subscript: ['<subscript>', '</subscript>'],
Expand Down
4 changes: 2 additions & 2 deletions test/substitutions_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
assert_equal '&#8220;a few quoted words&#8221;', para.sub_quotes(para.source)

para = block_from_string '"`a few quoted words`"', backend: 'docbook'
assert_equal '<quote>a few quoted words</quote>', para.sub_quotes(para.source)
assert_equal '<quote role="double">a few quoted words</quote>', para.sub_quotes(para.source)
end

test 'escaped single-line double-quoted string' do
Expand Down Expand Up @@ -116,7 +116,7 @@
assert_equal '&#8216;a few quoted words&#8217;', para.sub_quotes(para.source)

para = block_from_string %q('`a few quoted words`'), backend: 'docbook'
assert_equal '<quote>a few quoted words</quote>', para.sub_quotes(para.source)
assert_equal '<quote role="single">a few quoted words</quote>', para.sub_quotes(para.source)
end

test 'escaped single-line single-quoted string' do
Expand Down

0 comments on commit 2320fc3

Please sign in to comment.