diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2020-07-16 18:33:07 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-16 18:33:07 -0600 |
| commit | ef4e2f600b33674e7f3f342ed9650d9121fdcc8e (patch) | |
| tree | 2be3e03622781af616f66262ed5714ab8954f07e /lib | |
| parent | ca5928d42d3178f0617164ad3a77f0bea317fe3c (diff) | |
resolves #3714 honor start attribute on ordered list in manpage output (PR #3715)
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/asciidoctor/converter/manpage.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/asciidoctor/converter/manpage.rb b/lib/asciidoctor/converter/manpage.rb index 2beee41a..867e3cff 100644 --- a/lib/asciidoctor/converter/manpage.rb +++ b/lib/asciidoctor/converter/manpage.rb @@ -288,15 +288,16 @@ r lw(\n(.lu*75u/100u).' .B #{manify node.title} .br) if node.title? + start = (node.attr 'start', 1).to_i node.items.each_with_index do |item, idx| result << %(.sp .RS 4 .ie n \\{\\ -\\h'-04' #{idx + 1}.\\h'+01'\\c +\\h'-04' #{numeral = idx + start}.\\h'+01'\\c .\\} .el \\{\\ . sp -1 -. IP " #{idx + 1}." 4.2 +. IP " #{numeral}." 4.2 .\\} #{manify item.text, whitespace: :normalize}) result << item.content if item.blocks? |
