Skip to content

Commit bd678ec

Browse files
committed
Define the list_indent option to make it generally usable
1 parent 7e2edac commit bd678ec

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

lib/kramdown/converter/kramdown.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def initialize(root, options)
2727
@footnotes = []
2828
@abbrevs = []
2929
@stack = []
30-
@list_indent = options[:list_indent] || 2
30+
@list_indent = @options[:list_indent]
3131
@list_spacing = ' ' * (@list_indent - 2)
3232
end
3333

lib/kramdown/options.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,13 @@ def self.simple_hash_validator(val, name)
605605
simple_array_validator(val, :forbidden_inline_options)
606606
end
607607

608+
define(:list_indent, Integer, 2, <<~EOF)
609+
Sets the number of spaces to use for list indentation
610+
611+
Default: 2
612+
Used by: Kramdown converter
613+
EOF
614+
608615
end
609616

610617
end

0 commit comments

Comments
 (0)