<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/peg_markdown.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -11,7 +11,7 @@ spec =
   Gem::Specification.new do |s|
     s.name              = &quot;rpeg-markdown&quot;
     s.version           = VERS
-    s.summary           = &quot;Ruby extension library for peg-markdown&quot;
+    s.summary           = &quot;Fast and correct Markdown implementation&quot;
     s.files             = FileList[
                             'README','LICENSE','Rakefile',
                             '{lib,ext,test}/**.rb','ext/*.{c,h}',
@@ -78,17 +78,18 @@ file 'ext/Makefile' =&gt; FileList['ext/{extconf.rb,*.c,*.h,*.rb}'] do
 end
 CLEAN.include 'ext/Makefile'
 
-file &quot;ext/markdown.#{DLEXT}&quot; =&gt; FileList['ext/Makefile', 'ext/*.{c,h,rb}'] do |f|
+file &quot;ext/peg_markdown.#{DLEXT}&quot; =&gt; FileList['ext/Makefile', 'ext/*.{c,h,rb}'] do |f|
   sh 'cd ext &amp;&amp; make'
 end
 CLEAN.include 'ext/*.{o,bundle,so}'
 
-file &quot;lib/markdown.#{DLEXT}&quot; =&gt; &quot;ext/markdown.#{DLEXT}&quot; do |f|
+file &quot;lib/peg_markdown.#{DLEXT}&quot; =&gt; &quot;ext/peg_markdown.#{DLEXT}&quot; do |f|
   cp f.prerequisites, &quot;lib/&quot;, :preserve =&gt; true
 end
+CLEAN.include &quot;lib/*.{so,bundle}&quot;
 
-desc 'Build the peg-markdown extension'
-task :build =&gt; &quot;lib/markdown.#{DLEXT}&quot;
+desc 'Build the peg_markdown extension'
+task :build =&gt; &quot;lib/peg_markdown.#{DLEXT}&quot;
 
 desc 'Run unit and conformance tests'
 task :test =&gt; [ 'test:unit', 'test:conformance' ]</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -1,8 +1,6 @@
 require 'mkmf'
 
-dir_config('markdown')
-
-require 'pp'
+dir_config('peg_markdown')
 
 $objs = %w[markdown.o markdown_lib.o markdown_output.o markdown_parser.o]
 
@@ -14,4 +12,4 @@ else
 end
 
 create_header
-create_makefile('markdown')
+create_makefile('peg_markdown')</diff>
      <filename>ext/extconf.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,27 +3,24 @@
 
 static VALUE rb_cMarkdown;
 
-static ID id_text;
-static ID id_smart;
-static ID id_notes;
-
-#define TABSTOP 4
-#define INCREMENT 4096  /* size of chunks in which to allocate memory */
-
 static VALUE
 rb_markdown_to_html(int argc, VALUE *argv, VALUE self)
 {
     /* grab char pointer to markdown input text */
-    VALUE text = rb_funcall(self, id_text, 0);
+    VALUE text = rb_funcall(self, rb_intern(&quot;text&quot;), 0);
     Check_Type(text, T_STRING);
     char * ptext = StringValuePtr(text);
 
     /* flip extension bits */
     int extensions = 0;
-    if ( rb_funcall(self, id_smart, 0) == Qtrue )
+    if ( rb_funcall(self, rb_intern(&quot;smart&quot;), 0) == Qtrue )
         extensions = extensions | EXT_SMART ;
-    if ( rb_funcall(self, id_notes, 0) == Qtrue )
+    if ( rb_funcall(self, rb_intern(&quot;notes&quot;), 0) == Qtrue )
         extensions = extensions | EXT_NOTES ;
+    if ( rb_funcall(self, rb_intern(&quot;filter_html&quot;), 0) == Qtrue )
+        extensions = extensions | EXT_FILTER_HTML ;
+    if ( rb_funcall(self, rb_intern(&quot;filter_styles&quot;), 0) == Qtrue )
+        extensions = extensions | EXT_FILTER_STYLES ;
 
     char *html = markdown_to_string(ptext, extensions, HTML_FORMAT);
     VALUE result = rb_str_new2(html);
@@ -32,14 +29,9 @@ rb_markdown_to_html(int argc, VALUE *argv, VALUE self)
     return result;
 }
 
-void Init_markdown()
+void Init_peg_markdown()
 {
-    /* Initialize frequently used Symbols */
-    id_text = rb_intern(&quot;text&quot;);
-    id_smart = rb_intern(&quot;smart&quot;);
-    id_notes = rb_intern(&quot;notes&quot;);
-
-    rb_cMarkdown = rb_define_class(&quot;Markdown&quot;, rb_cObject);
+    rb_cMarkdown = rb_define_class(&quot;PEGMarkdown&quot;, rb_cObject);
     rb_define_method(rb_cMarkdown, &quot;to_html&quot;, rb_markdown_to_html, -1);
 }
 </diff>
      <filename>ext/markdown.c</filename>
    </modified>
    <modified>
      <diff>@@ -1,41 +1 @@
-require 'markdown.so'
-
-class Markdown
-
-  # Original Markdown formatted text.
-  attr_reader :text
-
-  # Set true to have smarty-like quote translation performed.
-  attr_accessor :smart
-
-  # Set true to have footnotes processed.
-  attr_accessor :notes
-
-  # BlueCloth compatible output filtering.
-  attr_accessor :filter_styles, :filter_html
-
-  # RedCloth compatible line folding -- not used for Markdown but
-  # included for compatibility.
-  attr_accessor :fold_lines
-
-  # Create a new Markdown processor. The +text+ argument
-  # should be a string containing Markdown text. Additional arguments may be
-  # supplied to set various processing options:
-  #
-  # * &lt;tt&gt;:smart&lt;/tt&gt; - Enable SmartyPants processing.
-  # * &lt;tt&gt;:notes&lt;/tt&gt; - Enable footnotes.
-  # * &lt;tt&gt;:filter_styles&lt;/tt&gt; - Do not output &lt;tt&gt;&lt;style&gt;&lt;/tt&gt; tags.
-  # * &lt;tt&gt;:filter_html&lt;/tt&gt; - Do not output any raw HTML tags included in
-  #   the source text.
-  # * &lt;tt&gt;:fold_lines&lt;/tt&gt; - RedCloth compatible line folding (not used).
-  #
-  # NOTE: The &lt;tt&gt;:filter_styles&lt;/tt&gt; and &lt;tt&gt;:filter_html&lt;/tt&gt; extensions
-  # are not yet implemented.
-  def initialize(text, *extensions)
-    @smart = false
-    @notes = false
-    @text = text
-    extensions.each { |e| send(&quot;#{e}=&quot;, true) }
-  end
-
-end
+require 'peg_markdown'</diff>
      <filename>lib/markdown.rb</filename>
    </modified>
    <modified>
      <diff>@@ -53,6 +53,8 @@ class MarkdownTest &lt; Test::Unit::TestCase
     assert_nothing_raised(ArgumentError) { markdown.to_html(true) }
   end
 
+  
+
   # Build tests for each file in the MarkdownTest test suite
 
   Dir[&quot;#{MARKDOWN_TEST_DIR}/Tests/*.text&quot;].each do |text_file|</diff>
      <filename>test/markdown_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>532ae5eee8a7f9d0feb0f9c3162811e61e8aa7e5</id>
    </parent>
  </parents>
  <author>
    <name>Ryan Tomayko</name>
    <email>rtomayko@gmail.com</email>
  </author>
  <url>http://github.com/rtomayko/rpeg-markdown/commit/d49de5c225420b99389e5232fb84af16c42d49b3</url>
  <id>d49de5c225420b99389e5232fb84af16c42d49b3</id>
  <committed-date>2008-08-01T23:08:06-07:00</committed-date>
  <authored-date>2008-08-01T22:45:26-07:00</authored-date>
  <message>filter_html/filter_styles support; extension/class renaming

The markdown extension has been renamed peg_markdown. The
class has been renamed PEGMarkdown. You can still just:
require 'markdown' -- the ::Markdown constant will be set
to PEGMarkdown if it's not already defined. IOW, this should
be a mostly backward compatible change.</message>
  <tree>6a22f4a0139a511e282597143b1e25a3e7310ed8</tree>
  <committer>
    <name>Ryan Tomayko</name>
    <email>rtomayko@gmail.com</email>
  </committer>
</commit>
