Module: MdxTex::ToTextile::Bold
- Defined in:
- lib/mdx_tex/to_textile/bold.rb
Overview
Converts Markdown bold syntax to Textile bold syntax. Both ** and __ delimiters are supported and processed independently. Note: nested mixed delimiters (e.g. __text__) are not supported.
| Input (Markdown) | Output (Textile) | |—————————|————————-| | hello | hello | | __hello__ | hello | | foo bar baz | foo bar baz | | a and b | a and b | | a and __b__ | a and b |
Class Method Summary collapse
Class Method Details
.execute(line) ⇒ Object
17 18 19 20 21 |
# File 'lib/mdx_tex/to_textile/bold.rb', line 17 def self.execute(line) line .gsub(/\*\*(.+?)\*\*/, '*\1*') .gsub(/__(.+?)__/, '*\1*') end |