Skip to content

Commit

Permalink
Define the list_indent option to make it generally usable
Browse files Browse the repository at this point in the history
  • Loading branch information
gettalong committed Apr 25, 2022
1 parent 7e2edac commit bd678ec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/kramdown/converter/kramdown.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def initialize(root, options)
@footnotes = []
@abbrevs = []
@stack = []
@list_indent = options[:list_indent] || 2
@list_indent = @options[:list_indent]
@list_spacing = ' ' * (@list_indent - 2)
end

Expand Down
7 changes: 7 additions & 0 deletions lib/kramdown/options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,13 @@ def self.simple_hash_validator(val, name)
simple_array_validator(val, :forbidden_inline_options)
end

define(:list_indent, Integer, 2, <<~EOF)
Sets the number of spaces to use for list indentation
Default: 2
Used by: Kramdown converter
EOF

end

end

0 comments on commit bd678ec

Please sign in to comment.