module Filters module PreFilter def format_command_line!(text) text.gsub! /\n?``` command-line(.+?)```/m do |block| block.gsub! /^``` command-line/, '
'
        block.gsub! /^```$/, "
\n" block.gsub!(/^\$ (.+)$/) { %Q|#{$1.rstrip}| } block.gsub!(/^(\# .+)$/) { %Q|#{$1.rstrip}| } block.gsub!(/^> (.+)$/) { %Q|# #{$1.rstrip}| } block end end end end