kramdown 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of kramdown might be problematic. Click here for more details.
- data/ChangeLog +346 -0
- data/Rakefile +36 -29
- data/VERSION +1 -1
- data/benchmark/testing.sh +1 -1
- data/bin/kramdown +0 -4
- data/doc/index.page +1 -1
- data/doc/links.markdown +4 -0
- data/doc/news.page +2 -1
- data/doc/quickref.page +134 -125
- data/doc/syntax.page +304 -302
- data/lib/kramdown/converter/base.rb +14 -0
- data/lib/kramdown/converter/html.rb +64 -2
- data/lib/kramdown/converter/latex.rb +14 -7
- data/lib/kramdown/document.rb +7 -3
- data/lib/kramdown/options.rb +13 -1
- data/lib/kramdown/parser/kramdown.rb +70 -17
- data/lib/kramdown/parser/kramdown/abbreviation.rb +65 -0
- data/lib/kramdown/parser/kramdown/attribute_list.rb +2 -1
- data/lib/kramdown/parser/kramdown/blank_line.rb +1 -1
- data/lib/kramdown/parser/kramdown/blockquote.rb +1 -1
- data/lib/kramdown/parser/kramdown/codeblock.rb +2 -2
- data/lib/kramdown/parser/kramdown/eob.rb +1 -1
- data/lib/kramdown/parser/kramdown/extension.rb +86 -6
- data/lib/kramdown/parser/kramdown/header.rb +2 -17
- data/lib/kramdown/parser/kramdown/horizontal_rule.rb +1 -1
- data/lib/kramdown/parser/kramdown/list.rb +8 -2
- data/lib/kramdown/parser/kramdown/math.rb +1 -1
- data/lib/kramdown/parser/kramdown/paragraph.rb +1 -1
- data/lib/kramdown/parser/kramdown/smart_quotes.rb +2 -2
- data/lib/kramdown/parser/kramdown/table.rb +1 -1
- data/lib/kramdown/version.rb +1 -1
- data/man/man1/kramdown.1 +77 -63
- data/test/testcases/block/04_header/with_auto_id_prefix.html +3 -0
- data/test/testcases/block/04_header/with_auto_id_prefix.options +2 -0
- data/test/testcases/block/04_header/with_auto_id_prefix.text +3 -0
- data/test/testcases/block/08_list/item_ial.html +9 -0
- data/test/testcases/block/08_list/item_ial.text +5 -0
- data/test/testcases/block/11_ial/auto_id_and_ial.html +1 -1
- data/test/testcases/block/11_ial/auto_id_and_ial.text +1 -1
- data/test/testcases/block/11_ial/simple.html +5 -0
- data/test/testcases/block/11_ial/simple.text +7 -0
- data/test/testcases/block/12_extension/comment.text +5 -5
- data/test/testcases/block/12_extension/ignored.html +0 -2
- data/test/testcases/block/12_extension/ignored.text +3 -6
- data/test/testcases/block/12_extension/nomarkdown.text +4 -4
- data/test/testcases/block/12_extension/options.html +1 -1
- data/test/testcases/block/12_extension/options.text +5 -6
- data/test/testcases/block/12_extension/options2.text +1 -1
- data/test/testcases/block/12_extension/options3.text +1 -1
- data/test/testcases/span/abbreviations/abbrev.html +8 -0
- data/test/testcases/span/abbreviations/abbrev.text +15 -0
- data/test/testcases/span/abbreviations/abbrev_defs.html +2 -0
- data/test/testcases/span/abbreviations/abbrev_defs.text +5 -0
- data/test/testcases/span/extension/comment.html +6 -0
- data/test/testcases/span/extension/comment.text +6 -0
- data/test/testcases/span/extension/ignored.html +1 -0
- data/test/testcases/span/extension/ignored.text +1 -0
- data/test/testcases/span/extension/nomarkdown.html +1 -0
- data/test/testcases/span/extension/nomarkdown.text +1 -0
- data/test/testcases/span/extension/options.html +1 -0
- data/test/testcases/span/extension/options.text +1 -0
- data/test/testcases/span/ial/simple.html +2 -1
- data/test/testcases/span/ial/simple.text +1 -0
- data/test/testcases/span/text_substitutions/typography.html +3 -0
- data/test/testcases/span/text_substitutions/typography.text +3 -0
- metadata +275 -263
@@ -32,7 +32,7 @@ module Kramdown
|
|
32
32
|
if @tree.children.last && @tree.children.last.type == :blank
|
33
33
|
@tree.children.last.value += @src.matched
|
34
34
|
else
|
35
|
-
@tree.children <<
|
35
|
+
@tree.children << new_block_el(:blank, @src.matched)
|
36
36
|
end
|
37
37
|
true
|
38
38
|
end
|
@@ -30,7 +30,7 @@ module Kramdown
|
|
30
30
|
# Parse the blockquote at the current location.
|
31
31
|
def parse_blockquote
|
32
32
|
result = @src.scan(BLOCKQUOTE_MATCH).gsub(BLOCKQUOTE_START, '')
|
33
|
-
el =
|
33
|
+
el = new_block_el(:blockquote)
|
34
34
|
@tree.children << el
|
35
35
|
parse_blocks(el, result)
|
36
36
|
true
|
@@ -32,7 +32,7 @@ module Kramdown
|
|
32
32
|
|
33
33
|
# Parse the indented codeblock at the current location.
|
34
34
|
def parse_codeblock
|
35
|
-
@tree.children <<
|
35
|
+
@tree.children << new_block_el(:codeblock, @src.scan(CODEBLOCK_MATCH).gsub!(INDENT, ''))
|
36
36
|
true
|
37
37
|
end
|
38
38
|
define_parser(:codeblock, CODEBLOCK_START)
|
@@ -45,7 +45,7 @@ module Kramdown
|
|
45
45
|
def parse_codeblock_fenced
|
46
46
|
if @src.check(FENCED_CODEBLOCK_MATCH)
|
47
47
|
@src.pos += @src.matched_size
|
48
|
-
@tree.children <<
|
48
|
+
@tree.children << new_block_el(:codeblock, @src[2])
|
49
49
|
true
|
50
50
|
else
|
51
51
|
false
|
@@ -70,11 +70,11 @@ module Kramdown
|
|
70
70
|
end
|
71
71
|
|
72
72
|
|
73
|
-
|
74
|
-
|
73
|
+
EXT_BLOCK_START_STR_DEPR = "^#{OPT_SPACE}\\{::(%s):(:)?(#{ALD_ANY_CHARS}*)\\}\s*?\n"
|
74
|
+
EXT_BLOCK_START_DEPR = /#{EXT_BLOCK_START_STR_DEPR % ALD_ID_NAME}/
|
75
75
|
|
76
|
-
# Parse the extension
|
77
|
-
def
|
76
|
+
# Parse the block extension at the current location.
|
77
|
+
def parse_extension_block_depr
|
78
78
|
@src.pos += @src.matched_size
|
79
79
|
|
80
80
|
ext = @src[1]
|
@@ -82,13 +82,18 @@ module Kramdown
|
|
82
82
|
body = nil
|
83
83
|
parse_attribute_list(@src[3], opts)
|
84
84
|
|
85
|
+
warn('DEPRECATION warning: This syntax is deprecated, use the new extension syntax')
|
86
|
+
if !%w{comment nomarkdown options}.include?(ext)
|
87
|
+
warn('DEPRECATION warning: Custom extensions will be removed in a future version - use a template processor like ERB instead')
|
88
|
+
end
|
89
|
+
|
85
90
|
if !@extension.public_methods.map {|m| m.to_s}.include?("parse_#{ext}")
|
86
91
|
warning("No extension named '#{ext}' found - ignoring extension block")
|
87
92
|
body = :invalid
|
88
93
|
end
|
89
94
|
|
90
95
|
if !@src[2]
|
91
|
-
stop_re = /#{
|
96
|
+
stop_re = /#{EXT_BLOCK_START_STR_DEPR % ext}/
|
92
97
|
if result = @src.scan_until(stop_re)
|
93
98
|
parse_attribute_list(@src[3], opts)
|
94
99
|
body = result.sub!(stop_re, '') if body != :invalid
|
@@ -102,7 +107,82 @@ module Kramdown
|
|
102
107
|
|
103
108
|
true
|
104
109
|
end
|
105
|
-
define_parser(:
|
110
|
+
define_parser(:extension_block_depr, EXT_BLOCK_START_DEPR)
|
111
|
+
|
112
|
+
|
113
|
+
##########################################
|
114
|
+
### Code for handling new extension syntax
|
115
|
+
##########################################
|
116
|
+
|
117
|
+
def parse_extension_start_tag(type)
|
118
|
+
@src.pos += @src.matched_size
|
119
|
+
|
120
|
+
if @src[4] || @src.matched == '{:/}'
|
121
|
+
name = (@src[4] ? "for '#{@src[4]}' " : '')
|
122
|
+
warning("Invalid extension stop tag #{name}found - ignoring it")
|
123
|
+
return
|
124
|
+
end
|
125
|
+
|
126
|
+
ext = @src[1]
|
127
|
+
opts = {}
|
128
|
+
body = nil
|
129
|
+
parse_attribute_list(@src[2] || '', opts)
|
130
|
+
|
131
|
+
if !@src[3]
|
132
|
+
stop_re = (type == :block ? /#{EXT_BLOCK_STOP_STR % ext}/ : /#{EXT_STOP_STR % ext}/)
|
133
|
+
if result = @src.scan_until(stop_re)
|
134
|
+
body = result.sub!(stop_re, '')
|
135
|
+
else
|
136
|
+
warning("No stop tag for extension '#{ext}' found - treating it as extension without body")
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
handle_extension(ext, opts, body, type)
|
141
|
+
end
|
142
|
+
|
143
|
+
def handle_extension(name, opts, body, type)
|
144
|
+
case name
|
145
|
+
when 'comment'
|
146
|
+
# nothing to do
|
147
|
+
when 'nomarkdown'
|
148
|
+
@tree.children << Element.new(:raw, body, :type => type) if body.kind_of?(String)
|
149
|
+
when 'options'
|
150
|
+
opts.select do |k,v|
|
151
|
+
k = k.to_sym
|
152
|
+
if Kramdown::Options.defined?(k)
|
153
|
+
@doc.options[k] = Kramdown::Options.parse(k, v) rescue @doc.options[k]
|
154
|
+
false
|
155
|
+
else
|
156
|
+
true
|
157
|
+
end
|
158
|
+
end.each do |k,v|
|
159
|
+
warning("Unknown kramdown option '#{k}'")
|
160
|
+
end
|
161
|
+
else
|
162
|
+
warning("Invalid extension name '#{name}' specified - ignoring extension")
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
|
167
|
+
EXT_STOP_STR = "\\{:/(%s)?\\}"
|
168
|
+
EXT_START_STR = "\\{::(\\w+)(?:\\s(#{ALD_ANY_CHARS}*?)|)(\\/)?\\}"
|
169
|
+
EXT_SPAN_START = /#{EXT_START_STR}|#{EXT_STOP_STR % ALD_ID_NAME}/
|
170
|
+
EXT_BLOCK_START = /^#{OPT_SPACE}(?:#{EXT_START_STR}|#{EXT_STOP_STR % ALD_ID_NAME})\s*?\n/
|
171
|
+
EXT_BLOCK_STOP_STR = "^#{OPT_SPACE}#{EXT_STOP_STR}\s*?\n"
|
172
|
+
|
173
|
+
# Parse the extension block at the current location.
|
174
|
+
def parse_block_extension
|
175
|
+
parse_extension_start_tag(:block)
|
176
|
+
true
|
177
|
+
end
|
178
|
+
define_parser(:block_extension, EXT_BLOCK_START)
|
179
|
+
|
180
|
+
|
181
|
+
# Parse the extension span at the current location.
|
182
|
+
def parse_span_extension
|
183
|
+
parse_extension_start_tag(:span)
|
184
|
+
end
|
185
|
+
define_parser(:span_extension, EXT_SPAN_START, '\{:[:/]')
|
106
186
|
|
107
187
|
end
|
108
188
|
end
|
@@ -24,19 +24,6 @@ module Kramdown
|
|
24
24
|
module Parser
|
25
25
|
class Kramdown
|
26
26
|
|
27
|
-
# Generate an alpha-numeric ID from the the string +str+.
|
28
|
-
def generate_id(str)
|
29
|
-
gen_id = str.gsub(/[^a-zA-Z0-9 -]/, '').gsub(/^[^a-zA-Z]*/, '').gsub(' ', '-').downcase
|
30
|
-
gen_id = 'section' if gen_id.length == 0
|
31
|
-
@used_ids ||= {}
|
32
|
-
if @used_ids.has_key?(gen_id)
|
33
|
-
gen_id += '-' + (@used_ids[gen_id] += 1).to_s
|
34
|
-
else
|
35
|
-
@used_ids[gen_id] = 0
|
36
|
-
end
|
37
|
-
gen_id
|
38
|
-
end
|
39
|
-
|
40
27
|
HEADER_ID=/(?:[ \t]\{#((?:\w|\d)[\w\d-]*)\})?/
|
41
28
|
SETEXT_HEADER_START = /^(#{OPT_SPACE}[^ \t].*?)#{HEADER_ID}[ \t]*?\n(-|=)+\s*?\n/
|
42
29
|
|
@@ -47,10 +34,9 @@ module Kramdown
|
|
47
34
|
end
|
48
35
|
@src.pos += @src.matched_size
|
49
36
|
text, id, level = @src[1].strip, @src[2], @src[3]
|
50
|
-
el =
|
37
|
+
el = new_block_el(:header, nil, :level => (level == '-' ? 2 : 1), :raw_text => text)
|
51
38
|
add_text(text, el)
|
52
39
|
el.options[:attr] = {'id' => id} if id
|
53
|
-
el.options[:attr] = {'id' => generate_id(text)} if @doc.options[:auto_ids] && !id
|
54
40
|
@tree.children << el
|
55
41
|
true
|
56
42
|
end
|
@@ -67,10 +53,9 @@ module Kramdown
|
|
67
53
|
end
|
68
54
|
result = @src.scan(ATX_HEADER_MATCH)
|
69
55
|
level, text, id = @src[1], @src[2].strip, @src[3]
|
70
|
-
el =
|
56
|
+
el = new_block_el(:header, nil, :level => level.length, :raw_text => text)
|
71
57
|
add_text(text, el)
|
72
58
|
el.options[:attr] = {'id' => id} if id
|
73
|
-
el.options[:attr] = {'id' => generate_id(text)} if @doc.options[:auto_ids] && !id
|
74
59
|
@tree.children << el
|
75
60
|
true
|
76
61
|
end
|
@@ -29,7 +29,7 @@ module Kramdown
|
|
29
29
|
# Parse the horizontal rule at the current location.
|
30
30
|
def parse_horizontal_rule
|
31
31
|
@src.pos += @src.matched_size
|
32
|
-
@tree.children <<
|
32
|
+
@tree.children << new_block_el(:hr)
|
33
33
|
true
|
34
34
|
end
|
35
35
|
define_parser(:horizontal_rule, HR_START)
|
@@ -23,6 +23,7 @@
|
|
23
23
|
require 'kramdown/parser/kramdown/blank_line'
|
24
24
|
require 'kramdown/parser/kramdown/eob'
|
25
25
|
require 'kramdown/parser/kramdown/horizontal_rule'
|
26
|
+
require 'kramdown/parser/kramdown/attribute_list'
|
26
27
|
|
27
28
|
module Kramdown
|
28
29
|
module Parser
|
@@ -59,7 +60,7 @@ module Kramdown
|
|
59
60
|
end
|
60
61
|
|
61
62
|
type, list_start_re = (@src.check(LIST_START_UL) ? [:ul, LIST_START_UL] : [:ol, LIST_START_OL])
|
62
|
-
list =
|
63
|
+
list = new_block_el(type)
|
63
64
|
|
64
65
|
item = nil
|
65
66
|
indent_re = nil
|
@@ -74,6 +75,11 @@ module Kramdown
|
|
74
75
|
item.value, indentation, content_re, indent_re = parse_first_list_line(@src[1].length, @src[2])
|
75
76
|
list.children << item
|
76
77
|
|
78
|
+
item.value.sub!(/^#{IAL_SPAN_START}/) do |match|
|
79
|
+
parse_attribute_list($~[1], item.options[:ial] ||= {})
|
80
|
+
''
|
81
|
+
end
|
82
|
+
|
77
83
|
list_start_re = (type == :ul ? /^( {0,#{[3, indentation - 1].min}}[+*-])([\t| ].*?\n)/ :
|
78
84
|
/^( {0,#{[3, indentation - 1].min}}\d+\.)([\t| ].*?\n)/)
|
79
85
|
nested_list_found = false
|
@@ -146,7 +152,7 @@ module Kramdown
|
|
146
152
|
end
|
147
153
|
|
148
154
|
first_as_para = false
|
149
|
-
deflist =
|
155
|
+
deflist = new_block_el(:dl)
|
150
156
|
para = @tree.children.pop
|
151
157
|
if para.type == :blank
|
152
158
|
para = @tree.children.pop
|
@@ -33,7 +33,7 @@ module Kramdown
|
|
33
33
|
return false
|
34
34
|
end
|
35
35
|
@src.pos += @src.matched_size
|
36
|
-
@tree.children <<
|
36
|
+
@tree.children << new_block_el(:math, @src[2], :type => :block)
|
37
37
|
true
|
38
38
|
end
|
39
39
|
define_parser(:block_math, BLOCK_MATH_START)
|
@@ -32,7 +32,7 @@ module Kramdown
|
|
32
32
|
if @tree.children.last && @tree.children.last.type == :p
|
33
33
|
@tree.children.last.children.first.value << "\n" << @src.matched.chomp
|
34
34
|
else
|
35
|
-
@tree.children <<
|
35
|
+
@tree.children << new_block_el(:p)
|
36
36
|
add_text(@src.matched.lstrip.chomp, @tree.children.last)
|
37
37
|
end
|
38
38
|
true
|
@@ -178,8 +178,8 @@ module Kramdown
|
|
178
178
|
# Special case for e.g. "<i>Custer</i>'s Last Stand."
|
179
179
|
[/("|')(\s|s\b|$)/, [:rquote1, 2]],
|
180
180
|
# Any remaining single quotes should be opening ones:
|
181
|
-
[/(.?)'
|
182
|
-
[/(.?)"
|
181
|
+
[/(.?)'/m, [1, :lsquo]],
|
182
|
+
[/(.?)"/m, [1, :ldquo]],
|
183
183
|
] #'"
|
184
184
|
|
185
185
|
SQ_SUBSTS = {
|
data/lib/kramdown/version.rb
CHANGED
data/man/man1/kramdown.1
CHANGED
@@ -30,15 +30,52 @@ Show the help.
|
|
30
30
|
.SH KRAMDOWN OPTIONS
|
31
31
|
|
32
32
|
.TP
|
33
|
-
.B \-\-
|
33
|
+
.B \-\-template ARG
|
34
34
|
|
35
|
-
|
35
|
+
The name of an ERB template file that should be used to wrap the output
|
36
36
|
|
37
|
-
|
38
|
-
|
37
|
+
This is used to wrap the output in an environment so that the output can
|
38
|
+
be used as a stand-alone document. For example, an HTML template would
|
39
|
+
provide the needed header and body tags so that the whole output is a
|
40
|
+
valid HTML file. If no template is specified, the output will be just
|
41
|
+
the converted text.
|
39
42
|
|
40
|
-
|
41
|
-
|
43
|
+
When resolving the template file, the given template name is used first.
|
44
|
+
If such a file is not found, the converter extension is appended. If the
|
45
|
+
file still cannot be found, the templates name is interpreted as a
|
46
|
+
template name that is provided by kramdown (without the converter
|
47
|
+
extension).
|
48
|
+
|
49
|
+
kramdown provides a default template named 'default' for each converter.
|
50
|
+
|
51
|
+
Default: ''
|
52
|
+
Used by: all converters
|
53
|
+
|
54
|
+
|
55
|
+
.TP
|
56
|
+
.B \-\-[no\-]auto_ids
|
57
|
+
|
58
|
+
Use automatic header ID generation
|
59
|
+
|
60
|
+
If this option is `true`, ID values for all headers are automatically
|
61
|
+
generated if no ID is explicitly specified.
|
62
|
+
|
63
|
+
Default: true
|
64
|
+
Used by: HTML/Latex converter
|
65
|
+
|
66
|
+
|
67
|
+
.TP
|
68
|
+
.B \-\-auto_id_prefix ARG
|
69
|
+
|
70
|
+
Prefix used for automatically generated heaer IDs
|
71
|
+
|
72
|
+
This option can be used to set a prefix for the automatically generated
|
73
|
+
header IDs so that there is no conflict when rendering multiple kramdown
|
74
|
+
documents into one output file separately. The prefix should only
|
75
|
+
contain characters that are valid in an ID!
|
76
|
+
|
77
|
+
Default: ''
|
78
|
+
Used by: HTML/Latex converter
|
42
79
|
|
43
80
|
|
44
81
|
.TP
|
@@ -55,15 +92,6 @@ Default: false
|
|
55
92
|
Used by: kramdown parser
|
56
93
|
|
57
94
|
|
58
|
-
.TP
|
59
|
-
.B \-\-coderay_line_number_start ARG
|
60
|
-
|
61
|
-
The start value for the line numbers
|
62
|
-
|
63
|
-
Default: 1
|
64
|
-
Used by: HTML converter
|
65
|
-
|
66
|
-
|
67
95
|
.TP
|
68
96
|
.B \-\-[no\-]parse_span_html
|
69
97
|
|
@@ -76,14 +104,6 @@ Default: true
|
|
76
104
|
Used by: kramdown parser
|
77
105
|
|
78
106
|
|
79
|
-
.TP
|
80
|
-
.B \-\-coderay_tab_width ARG
|
81
|
-
|
82
|
-
The tab width used in highlighted code
|
83
|
-
|
84
|
-
Used by: HTML converter
|
85
|
-
|
86
|
-
|
87
107
|
.TP
|
88
108
|
.B \-\-footnote_nr ARG
|
89
109
|
|
@@ -96,15 +116,6 @@ Default: 1
|
|
96
116
|
Used by: HTML converter
|
97
117
|
|
98
118
|
|
99
|
-
.TP
|
100
|
-
.B \-\-coderay_bold_every ARG
|
101
|
-
|
102
|
-
Defines how often a line number should be made bold
|
103
|
-
|
104
|
-
Default: 10
|
105
|
-
Used by: HTML converter
|
106
|
-
|
107
|
-
|
108
119
|
.TP
|
109
120
|
.B \-\-filter_html ARG
|
110
121
|
|
@@ -121,62 +132,65 @@ Used by: HTML converter
|
|
121
132
|
|
122
133
|
|
123
134
|
.TP
|
124
|
-
.B \-\-
|
135
|
+
.B \-\-coderay_wrap ARG
|
125
136
|
|
126
|
-
Defines how the highlighted code
|
137
|
+
Defines how the highlighted code should be wrapped
|
127
138
|
|
128
|
-
|
129
|
-
elements, one must supply the needed CSS file) or :style (default CSS
|
130
|
-
styles are directly applied to the code elements).
|
139
|
+
The possible values are :span, :div or nil.
|
131
140
|
|
132
|
-
Default:
|
141
|
+
Default: :div
|
133
142
|
Used by: HTML converter
|
134
143
|
|
135
144
|
|
136
145
|
.TP
|
137
|
-
.B \-\-
|
146
|
+
.B \-\-coderay_line_numbers ARG
|
138
147
|
|
139
|
-
|
148
|
+
Defines how and if line numbers should be shown
|
140
149
|
|
141
|
-
|
142
|
-
|
143
|
-
provide the needed header and body tags so that the whole output is a
|
144
|
-
valid HTML file. If no template is specified, the output will be just
|
145
|
-
the converted text.
|
150
|
+
The possible values are :table, :inline, :list or nil. If this option is
|
151
|
+
nil, no line numbers are shown.
|
146
152
|
|
147
|
-
|
148
|
-
|
149
|
-
file still cannot be found, the templates name is interpreted as a
|
150
|
-
template name that is provided by kramdown (without the converter
|
151
|
-
extension).
|
153
|
+
Default: :inline
|
154
|
+
Used by: HTML converter
|
152
155
|
|
153
|
-
kramdown provides a default template named 'default' for each converter.
|
154
156
|
|
155
|
-
|
156
|
-
|
157
|
+
.TP
|
158
|
+
.B \-\-coderay_line_number_start ARG
|
159
|
+
|
160
|
+
The start value for the line numbers
|
161
|
+
|
162
|
+
Default: 1
|
163
|
+
Used by: HTML converter
|
157
164
|
|
158
165
|
|
159
166
|
.TP
|
160
|
-
.B \-\-
|
167
|
+
.B \-\-coderay_tab_width ARG
|
161
168
|
|
162
|
-
|
169
|
+
The tab width used in highlighted code
|
163
170
|
|
164
|
-
|
171
|
+
Used by: HTML converter
|
165
172
|
|
166
|
-
|
173
|
+
|
174
|
+
.TP
|
175
|
+
.B \-\-coderay_bold_every ARG
|
176
|
+
|
177
|
+
Defines how often a line number should be made bold
|
178
|
+
|
179
|
+
Default: 10
|
167
180
|
Used by: HTML converter
|
168
181
|
|
169
182
|
|
170
183
|
.TP
|
171
|
-
.B \-\-
|
184
|
+
.B \-\-coderay_css ARG
|
172
185
|
|
173
|
-
|
186
|
+
Defines how the highlighted code gets styled
|
174
187
|
|
175
|
-
|
176
|
-
|
188
|
+
Possible values are :class (CSS classes are applied to the code
|
189
|
+
elements, one must supply the needed CSS file) or :style (default CSS
|
190
|
+
styles are directly applied to the code elements).
|
177
191
|
|
178
|
-
Default:
|
179
|
-
Used by:
|
192
|
+
Default: style
|
193
|
+
Used by: HTML converter
|
180
194
|
|
181
195
|
|
182
196
|
.SH SEE ALSO
|