def extract(html)
      examples = []

      s = StringScanner.new(html)
      while !s.eos? do
        if s.check(/</)
          if s.check(@begin_example_re)

            s.scan(@begin_example_re) =~ @begin_example_re
            options = build_options_hash($1)

            ex = s.scan_until(@end_example_re).sub(@end_example_re, '')

            examples << {
              :code => Util::HTML.unescape(Util::HTML.strip_tags(ex)),
              :options => options,
            }
          else
            s.skip(/</)
          end
        else
          s.skip(/[^<]+/)
        end
      end

      examples
    end
def extract(html)
      examples = []

      s = StringScanner.new(html)
      while !s.eos? do
        if s.check(/</)
          if s.check(@begin_example_re)

            s.scan(@begin_example_re) =~ @begin_example_re
            options = build_options_hash($1)

            ex = s.scan_until(@end_example_re).sub(@end_example_re, '')

            examples << {
              :code => Util::HTML.unescape(Util::HTML.strip_tags(ex)),
              :options => options,
            }
          else
            s.skip(/</)
          end
        else
          s.skip(/[^<]+/)
        end
      end

      examples
    end
Extracts inline examples from HTML