lib/peg_multimarkdown.rb in rpeg-multimarkdown2-2.0.1 vs lib/peg_multimarkdown.rb in rpeg-multimarkdown2-2.0.2
- old
+ new
@@ -19,10 +19,13 @@
attr_accessor :smart
# Set `true` to have footnotes processed.
attr_accessor :notes
+ # Set `true` to have labels generated.
+ attr_accessor :no_labels
+
# Do not output `<style>` tags included in the source text.
attr_accessor :filter_styles
# Do not output any raw HTML included in the source text.
attr_accessor :filter_html
@@ -45,17 +48,18 @@
# * `:filter_styles` - Do not output `<style>` tags included in the
# source text.
# * `:filter_html` - Do not output raw HTML included in the
# source text.
# * `:process_html` - Process MultiMarkdown code inside HTML tags.
- # * `:compatibility` - Process MultiMarkdown code in Markdown
+ # * `:compatibility` - Process MultiMarkdown code in Markdown
# compatibility mode (disables all other extensions)
# * `:fold_lines` - RedCloth compatible line folding (not used).
#
def initialize(text, *extensions)
@text = text
@smart = true
@notes = true
+ @no_labels = false
@filter_styles = false
@filter_html = false
@process_html = false
@compatibility = false
extensions.each { |e| send("#{e}=", true) }