require 'wparser/parse' module Blocks class List_number < Parse def self.parse line rex = /^\#\s*(\w*)/ @result = if line =~ rex and @list_flag == nil @list_flag = true line.sub(rex, "
    \n
  1. #$1
  2. ") elsif line =~ rex line.sub(rex, "
  3. #$1
  4. ") elsif line !~ rex and @list_flag == true @list_flag = nil "
#{line}\n" end super end end end