Class: Marko::Markup::MTodo

Inherits:
Macro
  • Object
show all
Defined in:
lib/marko/markup/macro.rb

Overview

TODO:

remove line with n when it starts from @@todo

inline @@todo macro

Instance Method Summary collapse

Methods inherited from Macro

#gsub!, #pattern, pattern

Instance Method Details

#subs(sample, obj = nil) ⇒ Object



122
123
124
125
126
# File 'lib/marko/markup/macro.rb', line 122

def subs(sample, obj = nil)
  cap = /(.*)@@todo.*$/
  m = sample.match(cap)
  m[1].strip + sample.gsub(pattern, '')
end