Module: Blackrug

Extended by:
T::Sig
Defined in:
lib/blackrug.rb

Overview

Blackrug is this groundbreaking parser that allows you to sweep markdown under the rug by wrapping it by <!—Blackrug—> Typical markdown parser will render the blackrugged elements. You need to pre-parse it via Blackrug

Class Method Summary collapse

Class Method Details

.sweep(text) ⇒ Object Also known as: 🧹



15
16
17
# File 'lib/blackrug.rb', line 15

def sweep(text)
  text.split(/(?<!`)<!---Blackrug--->(?!`)/).select.with_index { |_, i| i.even? }.join
end