Module: Jekyll::MarkdownWikilinks
- Defined in:
- lib/markdown_wikilinks.rb
Instance Method Summary collapse
Instance Method Details
#wikilinks_to_markdown(input) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/markdown_wikilinks.rb', line 7 def wikilinks_to_markdown(input) input.gsub(/\[\[([^\]]+?)(\|([^\]]+?))?\]\]/) do link_text = $3 linked_page = $1 "[#{link_text}](#{linked_page}.md)" end end |