ronn-ng 0.8.2 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES +6 -0
- data/INSTALLING.md +2 -2
- data/Rakefile +3 -3
- data/bin/ronn +10 -8
- data/lib/ronn/document.rb +9 -9
- data/lib/ronn/roff.rb +6 -2
- data/lib/ronn.rb +3 -8
- data/man/ronn-format.7 +4 -4
- data/man/ronn.1 +3 -5
- data/man/ronn.1.ronn +0 -6
- data/ronn-ng.gemspec +3 -4
- data/test/angle_bracket_syntax.html +1 -1
- data/test/definition_list_syntax.html +2 -2
- data/test/definition_list_syntax.roff +1 -1
- data/test/dots_at_line_start_test.roff +1 -1
- data/test/ellipses.roff +1 -1
- data/test/entity_encoding_test.html +11 -12
- data/test/entity_encoding_test.roff +1 -1
- data/test/markdown_syntax.html +8 -10
- data/test/markdown_syntax.roff +1 -1
- data/test/middle_paragraph.roff +1 -1
- data/test/missing_spaces.roff +1 -1
- data/test/nested_list_with_code.html +6 -7
- data/test/nested_list_with_code.roff +1 -1
- data/test/ordered_list.html +8 -10
- data/test/ordered_list.roff +1 -1
- data/test/pre_block_with_quotes.roff +1 -1
- data/test/section_reference_links.roff +1 -1
- data/test/test_ronn.rb +1 -1
- data/test/underline_spacing_test.roff +1 -1
- metadata +17 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: caef2e245387dc095c174fe0db641e9548708a7e4ed06bbbbb5744ecec946a6c
|
4
|
+
data.tar.gz: ed1bf5365df919a3e346f666956f0dc1419e3854e5114ec364a21853bdb8559a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d00d492c752114c195f233b382820350c6048280a833324ae5a74b97bf79e581c64a4764cd808a7b8996ca73cc2cc7d7ffe6232dea500efbdb7cf3ccc59cfd59
|
7
|
+
data.tar.gz: 3a01bfda55e74743e125a036e5397b0fe32464386a9e6983469d64422ceaa915934b812735c7cdf1f082241fe0cae3b13bb793121eb375005e2972a57a8fc1d0
|
data/CHANGES
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
Ronn-NG CHANGES
|
2
2
|
===============
|
3
3
|
|
4
|
+
Version 0.9.0 (2019 Dec 21)
|
5
|
+
---------------------------
|
6
|
+
|
7
|
+
* Migrate to kramdown for the underlying Markdown library
|
8
|
+
* Minor output formatting and documentation improvements
|
9
|
+
|
4
10
|
Version 0.8.2 (2019 Mar 5)
|
5
11
|
--------------------------
|
6
12
|
|
data/INSTALLING.md
CHANGED
@@ -68,7 +68,7 @@ PATH=$(pwd)/ronn-ng/bin:$PATH
|
|
68
68
|
The following gems are required for ronn-ng development:
|
69
69
|
* nokogiri
|
70
70
|
* mustache
|
71
|
-
*
|
71
|
+
* kramdown
|
72
72
|
* rubocop
|
73
73
|
* sinatra
|
74
74
|
* rack
|
@@ -76,7 +76,7 @@ The following gems are required for ronn-ng development:
|
|
76
76
|
* test-unit
|
77
77
|
|
78
78
|
```
|
79
|
-
gem install nokogiri mustache
|
79
|
+
gem install nokogiri mustache kramdown rubocop sinatra rack rake test-unit
|
80
80
|
```
|
81
81
|
|
82
82
|
Or install them with bundler using the project's gem definition:
|
data/Rakefile
CHANGED
@@ -11,7 +11,7 @@ task :environment do
|
|
11
11
|
$LOAD_PATH.unshift ROOTDIR unless $LOAD_PATH.include?(ROOTDIR)
|
12
12
|
$LOAD_PATH.unshift LIBDIR unless $LOAD_PATH.include?(LIBDIR)
|
13
13
|
require_library 'nokogiri'
|
14
|
-
require_library '
|
14
|
+
require_library 'kramdown'
|
15
15
|
ENV['RUBYLIB'] = $LOAD_PATH.join(':')
|
16
16
|
ENV['PATH'] = "#{BINDIR}:#{ENV['PATH']}"
|
17
17
|
end
|
@@ -135,9 +135,9 @@ end
|
|
135
135
|
|
136
136
|
def require_library(name)
|
137
137
|
require name
|
138
|
-
rescue LoadError =>
|
138
|
+
rescue LoadError => e
|
139
139
|
unless defined?(Gem)
|
140
|
-
warn "warn: #{
|
140
|
+
warn "warn: #{e}. trying again with rubygems."
|
141
141
|
require 'rubygems'
|
142
142
|
retry
|
143
143
|
end
|
data/bin/ronn
CHANGED
@@ -22,7 +22,9 @@
|
|
22
22
|
# / Document attributes:
|
23
23
|
# / --date=<date> published date in YYYY-MM-DD format (bottom-center)
|
24
24
|
# / --manual=<name> name of the manual (top-center)
|
25
|
+
# / --name=<name> title of the manual page (top-left, top-right, bottom-right)
|
25
26
|
# / --organization=<name> publishing group or individual (bottom-left)
|
27
|
+
# / --section=<sec> section of the manual page (with name)
|
26
28
|
# /
|
27
29
|
# / Misc options:
|
28
30
|
# / -w, --warnings show troff warnings on stderr
|
@@ -46,11 +48,11 @@ end
|
|
46
48
|
# Libraries and LOAD_PATH shenanigans
|
47
49
|
|
48
50
|
begin
|
49
|
-
require '
|
51
|
+
require 'kramdown'
|
50
52
|
require 'nokogiri'
|
51
53
|
require 'ronn'
|
52
|
-
rescue LoadError =>
|
53
|
-
if
|
54
|
+
rescue LoadError => e
|
55
|
+
if e.to_s =~ /ronn/
|
54
56
|
libdir = File.expand_path('../lib', __dir__).sub(%r{^#{Dir.pwd}/}, './')
|
55
57
|
if File.directory?(libdir) && !$LOAD_PATH.include?(libdir)
|
56
58
|
# warn "warn: #{boom}. adding #{libdir} to RUBYLIB ..."
|
@@ -58,11 +60,11 @@ rescue LoadError => boom
|
|
58
60
|
retry
|
59
61
|
end
|
60
62
|
elsif !defined?(Gem)
|
61
|
-
warn "warn: #{
|
63
|
+
warn "warn: #{e}. loading rubygems ..."
|
62
64
|
require 'rubygems'
|
63
65
|
retry
|
64
66
|
end
|
65
|
-
abort
|
67
|
+
abort e.to_s
|
66
68
|
end
|
67
69
|
|
68
70
|
##
|
@@ -75,9 +77,9 @@ port_arg = nil
|
|
75
77
|
formats = nil
|
76
78
|
options = {}
|
77
79
|
write_index = false
|
78
|
-
styles
|
79
|
-
groff
|
80
|
-
pager
|
80
|
+
styles = %w[man]
|
81
|
+
groff = 'groff -Wall -mtty-char -mandoc -Tascii -t'
|
82
|
+
pager = ENV['MANPAGER'] || ENV['PAGER'] || 'more -is'
|
81
83
|
output_dir = nil
|
82
84
|
|
83
85
|
##
|
data/lib/ronn/document.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'time'
|
2
2
|
require 'cgi'
|
3
3
|
require 'nokogiri'
|
4
|
-
require '
|
4
|
+
require 'kramdown'
|
5
5
|
require 'ronn/index'
|
6
6
|
require 'ronn/roff'
|
7
7
|
require 'ronn/template'
|
@@ -20,7 +20,7 @@ module Ronn
|
|
20
20
|
include Ronn::Utils
|
21
21
|
|
22
22
|
# Path to the Ronn document. This may be '-' or nil when the Ronn::Document
|
23
|
-
# object is created with a stream.
|
23
|
+
# object is created with a stream, in which case stdin will be read.
|
24
24
|
attr_reader :path
|
25
25
|
|
26
26
|
# The raw input data, read from path or stream and unmodified.
|
@@ -58,7 +58,7 @@ module Ronn
|
|
58
58
|
# Array of style modules to apply to the document.
|
59
59
|
attr_reader :styles
|
60
60
|
|
61
|
-
# Output directory to write files to
|
61
|
+
# Output directory to write files to.
|
62
62
|
attr_accessor :outdir
|
63
63
|
|
64
64
|
# Create a Ronn::Document given a path or with the data returned by
|
@@ -118,7 +118,7 @@ module Ronn
|
|
118
118
|
return unless @basename
|
119
119
|
|
120
120
|
parts = @basename.split('.')
|
121
|
-
parts.pop if parts.last
|
121
|
+
parts.pop if parts.length > 1 && parts.last =~ /^\w+$/
|
122
122
|
parts.pop if parts.last =~ /^\d+$/
|
123
123
|
parts.join('.')
|
124
124
|
end
|
@@ -205,7 +205,7 @@ module Ronn
|
|
205
205
|
# tuple of the form: [name, section, description], where missing information
|
206
206
|
# is represented by nil and any element may be missing.
|
207
207
|
def sniff
|
208
|
-
html =
|
208
|
+
html = Kramdown::Document.new(data[0, 512], auto_ids: false, smart_quotes: ['apos', 'apos', 'quot', 'quot'], typographic_symbols: { hellip: '...', ndash: '--', mdash: '--' }).to_html
|
209
209
|
heading, html = html.split("</h1>\n", 2)
|
210
210
|
return [nil, nil, nil] if html.nil?
|
211
211
|
|
@@ -289,7 +289,7 @@ module Ronn
|
|
289
289
|
to_h.to_yaml
|
290
290
|
end
|
291
291
|
|
292
|
-
def to_json
|
292
|
+
def to_json(*_args)
|
293
293
|
require 'json'
|
294
294
|
to_h.merge('date' => date.iso8601).to_json
|
295
295
|
end
|
@@ -307,7 +307,7 @@ module Ronn
|
|
307
307
|
end
|
308
308
|
|
309
309
|
def input_html
|
310
|
-
@input_html ||= strip_heading(
|
310
|
+
@input_html ||= strip_heading(Kramdown::Document.new(markdown, auto_ids: false, smart_quotes: ['apos', 'apos', 'quot', 'quot'], typographic_symbols: { hellip: '...', ndash: '--', mdash: '--' }).to_html)
|
311
311
|
end
|
312
312
|
|
313
313
|
def strip_heading(html)
|
@@ -395,12 +395,12 @@ module Ronn
|
|
395
395
|
# process all unordered lists depth-first
|
396
396
|
@html.search('ul').to_a.reverse_each do |ul|
|
397
397
|
items = ul.search('li')
|
398
|
-
next if items.any? { |item| item.inner_text.split("\n", 2).first !~ /:$/ }
|
398
|
+
next if items.any? { |item| item.inner_text.strip.split("\n", 2).first !~ /:$/ }
|
399
399
|
|
400
400
|
dl = Nokogiri::XML::Node.new 'dl', html
|
401
401
|
items.each do |item|
|
402
402
|
# This processing is specific to how Markdown generates definition lists
|
403
|
-
term, definition = item.inner_html.split(":\n", 2)
|
403
|
+
term, definition = item.inner_html.strip.split(":\n", 2)
|
404
404
|
term = term.sub(/^<p>/, '')
|
405
405
|
|
406
406
|
dt = Nokogiri::XML::Node.new 'dt', html
|
data/lib/ronn/roff.rb
CHANGED
@@ -36,7 +36,11 @@ module Ronn
|
|
36
36
|
comment "generated with Ronn-NG/v#{Ronn.version}"
|
37
37
|
comment "http://github.com/apjanke/ronn-ng/tree/#{Ronn.revision}"
|
38
38
|
return if name.nil?
|
39
|
-
|
39
|
+
if manual
|
40
|
+
macro 'TH', %("#{escape(name.upcase)}" "#{section}" "#{date.strftime('%B %Y')}" "#{version}" "#{manual}")
|
41
|
+
else
|
42
|
+
macro 'TH', %("#{escape(name.upcase)}" "#{section}" "#{date.strftime('%B %Y')}" "#{version}")
|
43
|
+
end
|
40
44
|
end
|
41
45
|
|
42
46
|
def remove_extraneous_elements!(doc)
|
@@ -351,7 +355,7 @@ module Ronn
|
|
351
355
|
def write(text)
|
352
356
|
return if text.nil? || text.empty?
|
353
357
|
# lines cannot start with a '.'. insert zero-width character before.
|
354
|
-
text = text.gsub(/\n
|
358
|
+
text = text.gsub(/\n\\\./, "\n\\\\&\\.")
|
355
359
|
buf_ends_in_newline = @buf.last && @buf.last[-1] == "\n"
|
356
360
|
@buf << '\&' if text[0, 2] == '\.' && buf_ends_in_newline
|
357
361
|
@buf << text
|
data/lib/ronn.rb
CHANGED
@@ -15,13 +15,11 @@ module Ronn
|
|
15
15
|
Document.new(filename, attributes, &block)
|
16
16
|
end
|
17
17
|
|
18
|
-
# truthy when this a release (\d
|
18
|
+
# truthy when this a release (\d\.\d\.\d) version.
|
19
19
|
def self.release?
|
20
20
|
revision != '' && !revision.include?('-')
|
21
21
|
end
|
22
22
|
|
23
|
-
# version: 0.6.11
|
24
|
-
#
|
25
23
|
# A semantic version number based on the git revision. The third element
|
26
24
|
# of the version is incremented by the commit offset, such that version
|
27
25
|
# 0.6.6-5-gdacd74b => 0.6.11
|
@@ -31,11 +29,8 @@ module Ronn
|
|
31
29
|
ver.join('.')
|
32
30
|
end
|
33
31
|
|
34
|
-
# revision: 0.6.6-5-gdacd74b
|
35
|
-
# revision: 0.6.25
|
36
|
-
#
|
37
32
|
# The string revision as reported by: git-describe --tags. This is just the
|
38
|
-
# tag name when a tag references the HEAD commit (0.6.25). When the HEAD
|
33
|
+
# tag name when a tag references the HEAD commit (e.g. 0.6.25). When the HEAD
|
39
34
|
# commit is not tagged, this is a "<tag>-<offset>-<sha1>" string:
|
40
35
|
# <tag> - closest tag name
|
41
36
|
# <offset> - number of commits ahead of <tag>
|
@@ -47,6 +42,6 @@ module Ronn
|
|
47
42
|
# value generated by: rake rev
|
48
43
|
# or edit manually; I'm not sure of how rake rev interacts with git
|
49
44
|
# tags -apjanke
|
50
|
-
REV = '0.
|
45
|
+
REV = '0.9.0'.freeze
|
51
46
|
VERSION = version
|
52
47
|
end
|
data/man/ronn-format.7
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
.\" generated with Ronn-NG/v0.
|
2
|
-
.\" http://github.com/apjanke/ronn-ng/tree/0.
|
3
|
-
.TH "RONN\-FORMAT" "7" "December 2018" "Ronn-NG 0.
|
1
|
+
.\" generated with Ronn-NG/v0.9.0
|
2
|
+
.\" http://github.com/apjanke/ronn-ng/tree/0.9.0
|
3
|
+
.TH "RONN\-FORMAT" "7" "December 2018" "Ronn-NG 0.9.0" "Ronn Manual"
|
4
4
|
.SH "NAME"
|
5
5
|
\fBronn\-format\fR \- manual authoring format based on Markdown
|
6
6
|
.SH "SYNOPSIS"
|
@@ -85,7 +85,7 @@ Section headings should be all uppercase and may not contain inline markup\.
|
|
85
85
|
.SH "INLINE MARKUP"
|
86
86
|
Manpages have a limited set of text formatting capabilities\. There\'s basically \fBboldface\fR and \fIitalics\fR (often displayed using \fIunderline\fR)\. Ronn uses the following bits of markdown(7) to accomplish this:
|
87
87
|
.TP
|
88
|
-
\fB`backticks`\fR (markdown compatible)
|
88
|
+
\fB\e`backticks\e`\fR (markdown compatible)
|
89
89
|
Code, flags, commands, and noun\-like things; typically displayed in in \fBboldface\fR\. All text included within \fBbackticks\fR is displayed literally; other inline markup is not processed\. HTML output: \fB<code>\fR\.
|
90
90
|
.TP
|
91
91
|
\fB**double\-stars**\fR (markdown compatible)
|
data/man/ronn.1
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
.\" generated with Ronn-NG/v0.
|
2
|
-
.\" http://github.com/apjanke/ronn-ng/tree/0.
|
3
|
-
.TH "RONN" "1" "
|
1
|
+
.\" generated with Ronn-NG/v0.9.0
|
2
|
+
.\" http://github.com/apjanke/ronn-ng/tree/0.9.0
|
3
|
+
.TH "RONN" "1" "December 2019" "Ronn-NG 0.9.0" "Ronn Manual"
|
4
4
|
.SH "NAME"
|
5
5
|
\fBronn\fR \- convert markdown files to manpages
|
6
6
|
.SH "SYNOPSIS"
|
@@ -215,8 +215,6 @@ The paging program used for man pages\. This is typically set to something like
|
|
215
215
|
.TP
|
216
216
|
\fBPAGER\fR
|
217
217
|
Used instead of \fBMANPAGER\fR when \fBMANPAGER\fR is not defined\.
|
218
|
-
.SH "BUGS"
|
219
|
-
\fBRonn\fR is written in Ruby and depends on hpricot and rdiscount, extension libraries that are non\-trivial to install on some systems\. A more portable version of this program would be welcome\.
|
220
218
|
.SH "COPYRIGHT"
|
221
219
|
Ronn\-NG is Copyright (C) 2009 Ryan Tomayko \fI\%http://tomayko\.com/about\fR and (C) 2018 Andrew Janke \fI\%https://apjanke\.net\fR
|
222
220
|
.SH "SEE ALSO"
|
data/man/ronn.1.ronn
CHANGED
@@ -298,12 +298,6 @@ under a `man/` directory:
|
|
298
298
|
* `PAGER`:
|
299
299
|
Used instead of `MANPAGER` when `MANPAGER` is not defined.
|
300
300
|
|
301
|
-
## BUGS
|
302
|
-
|
303
|
-
**Ronn** is written in Ruby and depends on hpricot and rdiscount, extension
|
304
|
-
libraries that are non-trivial to install on some systems. A more portable
|
305
|
-
version of this program would be welcome.
|
306
|
-
|
307
301
|
## COPYRIGHT
|
308
302
|
|
309
303
|
Ronn-NG is Copyright (C) 2009 Ryan Tomayko <http://tomayko.com/about> and
|
data/ronn-ng.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'ronn-ng'
|
3
|
-
s.version = '0.
|
4
|
-
s.date = '2019-
|
3
|
+
s.version = '0.9.0'
|
4
|
+
s.date = '2019-12-21'
|
5
5
|
|
6
6
|
s.summary = 'Builds man pages from Markdown'
|
7
7
|
s.description = 'Ronn-NG builds manuals in HTML and Unix man page format from Markdown.'
|
@@ -111,9 +111,9 @@ Gem::Specification.new do |s|
|
|
111
111
|
s.test_files = s.files.select { |path| path =~ /^test\/.*_test.rb/ }
|
112
112
|
|
113
113
|
s.extra_rdoc_files = %w[LICENSE.txt AUTHORS]
|
114
|
+
s.add_dependency 'kramdown', '~> 2.1'
|
114
115
|
s.add_dependency 'mustache', '~> 0.7', '>= 0.7.0'
|
115
116
|
s.add_dependency 'nokogiri', '~> 1.9', '>= 1.9.0'
|
116
|
-
s.add_dependency 'rdiscount', '~> 2.0', '>= 2.0.7'
|
117
117
|
s.add_development_dependency 'rack', '~> 2.0', '>= 2.0.6'
|
118
118
|
s.add_development_dependency 'rake', '~> 12.3', '>= 12.3.0'
|
119
119
|
s.add_development_dependency 'rubocop', '~> 0.60', '>= 0.57.1'
|
@@ -122,5 +122,4 @@ Gem::Specification.new do |s|
|
|
122
122
|
|
123
123
|
s.rdoc_options = ['--line-numbers', '--inline-source', '--title', 'Ronn']
|
124
124
|
s.require_paths = %w[lib]
|
125
|
-
s.rubygems_version = '1.1.1'
|
126
125
|
end
|
data/test/ellipses.roff
CHANGED
@@ -15,20 +15,19 @@
|
|
15
15
|
<p>Here's some special entities:</p>
|
16
16
|
|
17
17
|
<ul>
|
18
|
-
<li>&bull; •</li>
|
19
|
-
<li>&nbsp; </li>
|
20
|
-
<li>&copy; ©</li>
|
21
|
-
<li>&rdquo; ”</li>
|
22
|
-
<li>&mdash; —</li>
|
23
|
-
<li>&reg; ®</li>
|
24
|
-
<li>&sect; §</li>
|
25
|
-
<li>&ge; ≥</li>
|
26
|
-
<li>&le; ≤</li>
|
27
|
-
<li>&ne; ≠</li>
|
28
|
-
<li>&equiv; ≡</li>
|
18
|
+
<li>&bull; •</li>
|
19
|
+
<li>&nbsp; </li>
|
20
|
+
<li>&copy; ©</li>
|
21
|
+
<li>&rdquo; ”</li>
|
22
|
+
<li>&mdash; —</li>
|
23
|
+
<li>&reg; ®</li>
|
24
|
+
<li>&sect; §</li>
|
25
|
+
<li>&ge; ≥</li>
|
26
|
+
<li>&le; ≤</li>
|
27
|
+
<li>&ne; ≠</li>
|
28
|
+
<li>&equiv; ≡</li>
|
29
29
|
</ul>
|
30
30
|
|
31
|
-
|
32
31
|
<p>Here's a line that uses non-breaking spaces to force the
|
33
32
|
last few words to wrap together.</p>
|
34
33
|
</div>
|
data/test/markdown_syntax.html
CHANGED
@@ -602,16 +602,15 @@ on a line by itself:</p>
|
|
602
602
|
<p>That is:</p>
|
603
603
|
|
604
604
|
<ul>
|
605
|
-
<li>Square brackets containing the link identifier (optionally
|
605
|
+
<li>Square brackets containing the link identifier (optionally
|
606
606
|
indented from the left margin using up to three spaces);</li>
|
607
|
-
<li>followed by a colon;</li>
|
608
|
-
<li>followed by one or more spaces (or tabs);</li>
|
609
|
-
<li>followed by the URL for the link;</li>
|
610
|
-
<li>optionally followed by a title attribute for the link, enclosed
|
607
|
+
<li>followed by a colon;</li>
|
608
|
+
<li>followed by one or more spaces (or tabs);</li>
|
609
|
+
<li>followed by the URL for the link;</li>
|
610
|
+
<li>optionally followed by a title attribute for the link, enclosed
|
611
611
|
in double or single quotes, or enclosed in parentheses.</li>
|
612
612
|
</ul>
|
613
613
|
|
614
|
-
|
615
614
|
<p>The following three link definitions are equivalent:</p>
|
616
615
|
|
617
616
|
<pre><code>[foo]: http://example.com/ "Optional Title Here"
|
@@ -853,15 +852,14 @@ for links, allowing for two styles: <em>inline</em> and <em>reference</em>.</p>
|
|
853
852
|
<p>That is:</p>
|
854
853
|
|
855
854
|
<ul>
|
856
|
-
<li>An exclamation mark: <code>!</code>;</li>
|
857
|
-
<li>followed by a set of square brackets, containing the <code>alt</code>
|
855
|
+
<li>An exclamation mark: <code>!</code>;</li>
|
856
|
+
<li>followed by a set of square brackets, containing the <code>alt</code>
|
858
857
|
attribute text for the image;</li>
|
859
|
-
<li>followed by a set of parentheses, containing the URL or path to
|
858
|
+
<li>followed by a set of parentheses, containing the URL or path to
|
860
859
|
the image, and an optional <code>title</code> attribute enclosed in double
|
861
860
|
or single quotes.</li>
|
862
861
|
</ul>
|
863
862
|
|
864
|
-
|
865
863
|
<p>Reference-style image syntax looks like this:</p>
|
866
864
|
|
867
865
|
<pre><code>![Alt text][id]
|
data/test/markdown_syntax.roff
CHANGED
data/test/middle_paragraph.roff
CHANGED
data/test/missing_spaces.roff
CHANGED
@@ -2,14 +2,13 @@
|
|
2
2
|
|
3
3
|
<h1 id="a-1-">a(1)</h1>
|
4
4
|
<ul>
|
5
|
-
<li>
|
5
|
+
<li>
|
6
6
|
<code>toggle_status</code>
|
7
|
-
|
8
|
-
<
|
9
|
-
|
10
|
-
</
|
11
|
-
|
12
|
-
<li>
|
7
|
+
<ul>
|
8
|
+
<li>Toggle the display of the status bar.</li>
|
9
|
+
</ul>
|
10
|
+
</li>
|
11
|
+
<li>
|
13
12
|
<code>spawn <executable> <additional args></code> TODO explain path-alike expansion</li>
|
14
13
|
</ul>
|
15
14
|
</div>
|
data/test/ordered_list.html
CHANGED
@@ -6,25 +6,23 @@
|
|
6
6
|
<h3 id="One-item-list">One-item list</h3>
|
7
7
|
|
8
8
|
<ol>
|
9
|
-
<li>Hello, world!</li>
|
9
|
+
<li>Hello, world!</li>
|
10
10
|
</ol>
|
11
11
|
|
12
|
-
|
13
12
|
<h3 id="Three-item-list">Three-item list</h3>
|
14
13
|
|
15
14
|
<ol>
|
16
|
-
<li>Hello, world!</li>
|
17
|
-
<li>Item 2</li>
|
18
|
-
<li>Item 3</li>
|
15
|
+
<li>Hello, world!</li>
|
16
|
+
<li>Item 2</li>
|
17
|
+
<li>Item 3</li>
|
19
18
|
</ol>
|
20
19
|
|
21
|
-
|
22
20
|
<h3 id="Four-item-list-with-all-1s">Four-item list with all 1s</h3>
|
23
21
|
|
24
22
|
<ol>
|
25
|
-
<li>Item 1</li>
|
26
|
-
<li>Item 2</li>
|
27
|
-
<li>Item 3</li>
|
28
|
-
<li>Item 4</li>
|
23
|
+
<li>Item 1</li>
|
24
|
+
<li>Item 2</li>
|
25
|
+
<li>Item 3</li>
|
26
|
+
<li>Item 4</li>
|
29
27
|
</ol>
|
30
28
|
</div>
|
data/test/ordered_list.roff
CHANGED
data/test/test_ronn.rb
CHANGED
@@ -20,7 +20,7 @@ class RonnTest < Test::Unit::TestCase
|
|
20
20
|
assert_equal 5, lines.size
|
21
21
|
assert_equal %(.\\" generated with Ronn-NG/v#{Ronn.version}), lines.shift
|
22
22
|
assert_equal %(.\\" http://github.com/apjanke/ronn-ng/tree/#{Ronn.revision}), lines.shift
|
23
|
-
assert_equal %(.TH "HELLO" "1" "November 2009" ""
|
23
|
+
assert_equal %(.TH "HELLO" "1" "November 2009" ""), lines.shift
|
24
24
|
assert_equal %(.SH "NAME"), lines.shift
|
25
25
|
assert_equal %(\\fBhello\\fR \\- hello world), lines.shift
|
26
26
|
assert_equal 0, lines.size
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ronn-ng
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Janke
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: kramdown
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.1'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.1'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: mustache
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -50,26 +64,6 @@ dependencies:
|
|
50
64
|
- - "~>"
|
51
65
|
- !ruby/object:Gem::Version
|
52
66
|
version: '1.9'
|
53
|
-
- !ruby/object:Gem::Dependency
|
54
|
-
name: rdiscount
|
55
|
-
requirement: !ruby/object:Gem::Requirement
|
56
|
-
requirements:
|
57
|
-
- - "~>"
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
version: '2.0'
|
60
|
-
- - ">="
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
version: 2.0.7
|
63
|
-
type: :runtime
|
64
|
-
prerelease: false
|
65
|
-
version_requirements: !ruby/object:Gem::Requirement
|
66
|
-
requirements:
|
67
|
-
- - "~>"
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: '2.0'
|
70
|
-
- - ">="
|
71
|
-
- !ruby/object:Gem::Version
|
72
|
-
version: 2.0.7
|
73
67
|
- !ruby/object:Gem::Dependency
|
74
68
|
name: rack
|
75
69
|
requirement: !ruby/object:Gem::Requirement
|
@@ -290,7 +284,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
290
284
|
- !ruby/object:Gem::Version
|
291
285
|
version: '0'
|
292
286
|
requirements: []
|
293
|
-
rubygems_version: 3.0.
|
287
|
+
rubygems_version: 3.0.6
|
294
288
|
signing_key:
|
295
289
|
specification_version: 4
|
296
290
|
summary: Builds man pages from Markdown
|