Class: Jekyll::Scholar::Markdown
- Inherits:
-
BibTeX::Filter
- Object
- BibTeX::Filter
- Jekyll::Scholar::Markdown
- Defined in:
- lib/jekyll/scholar/plugins/markdown_links.rb
Instance Method Summary collapse
Instance Method Details
#apply(value) ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/jekyll/scholar/plugins/markdown_links.rb', line 14 def apply(value) value.to_s.gsub(URL_PATTERN) { if $1 "[#{$2}](#{$1})" else "[#{$&}](#{$&})" end } end |