Class: MdxTex::Configuration
- Inherits:
-
Object
- Object
- MdxTex::Configuration
- Defined in:
- lib/mdx_tex/configuration.rb
Overview
Holds global defaults for all MdxTex conversions. Override these in an initializer (e.g. config/initializers/mdx_tex.rb):
MdxTex.configure do |config|
config.header_level = 'h2' # Textile heading tag (default: 'h3')
config.list_depth = 1 # Leading asterisks for depth-1 unordered list items (default: 3)
end
Per-call options always take precedence over these defaults:
MdxTex.to_textile(markdown: markdown, list_depth: 1)
Instance Attribute Summary collapse
-
#enable_string_extension ⇒ Object
Returns the value of attribute enable_string_extension.
-
#header_level ⇒ Object
Returns the value of attribute header_level.
-
#list_depth ⇒ Object
Returns the value of attribute list_depth.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
19 20 21 22 23 |
# File 'lib/mdx_tex/configuration.rb', line 19 def initialize @header_level = 'h3' @list_depth = 3 @enable_string_extension = false end |
Instance Attribute Details
#enable_string_extension ⇒ Object
Returns the value of attribute enable_string_extension.
17 18 19 |
# File 'lib/mdx_tex/configuration.rb', line 17 def enable_string_extension @enable_string_extension end |
#header_level ⇒ Object
Returns the value of attribute header_level.
16 17 18 |
# File 'lib/mdx_tex/configuration.rb', line 16 def header_level @header_level end |
#list_depth ⇒ Object
Returns the value of attribute list_depth.
16 17 18 |
# File 'lib/mdx_tex/configuration.rb', line 16 def list_depth @list_depth end |