Method: RDoc::Markdown::Literals#current_column
- Defined in:
- lib/rdoc/markdown/literals.rb
#current_column(target = pos) ⇒ Object
40 41 42 43 44 45 46 47 48 |
# File 'lib/rdoc/markdown/literals.rb', line 40 def current_column(target=pos) if string[target] == "\n" && (c = string.rindex("\n", target-1) || -1) return target - c elsif c = string.rindex("\n", target) return target - c end target + 1 end |