Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Version 1.0

  • Loading branch information...
commit 72d557ecada39821349fccee808bd5e1ead984fa 1 parent d49de5c
@rtomayko authored
Showing with 55 additions and 42 deletions.
  1. +0 −38 README
  2. +49 −0 README.markdown
  3. +4 −4 Rakefile
  4. +2 −0  lib/peg_markdown.rb
View
38 README
@@ -1,38 +0,0 @@
-Ruby peg-markdown Extension
-===========================
-
-The peg-markdown extension wraps John MacFarlane's C implementation of
-Markdown (see [peg-markdown][1]) in a Ruby extension.
-
-[1]: http://github.com/jgm/peg-markdown/
- "Jon MacFarleane's peg-markdown project"
-
-Installation/Hacking
---------------------
-
-This library requires a recent version of glib2.
-
-The rpeg-markdown gem is available from Rubyforge:
-
- $ sudo gem install rpeg-markdown
-
-A Git repository is available for hacking:
-
- $ git clone git://github.com/rtomayko/rpeg-markdown.git
- $ cd rpeg-markdown
- $ rake test
-
-Patches happily accepted via fork or email.
-
-Changes
--------
-
-0.2.0 / 2008-07-12 - Adds test suite and plugs all memory leaks.
-0.1.0 / 2008-05-30 - Initial release.
-
-COPYING
--------
-
-The peg-markdown sources are licensed under the GPL and the Ruby extension
-sources adopts this license. See the file LICENSE included with this
-distribution for more information.
View
49 README.markdown
@@ -0,0 +1,49 @@
+Ruby PEG Markdown
+=================
+
+An extension library around [John MacFarlane's fast implementation][1]
+of Markdown in C.
+
+[1]: http://github.com/jgm/peg-markdown/
+
+Synopsis
+--------
+
+ >> require 'markdown'
+ >> puts Markdown.new('Hello, world.').to_html
+ <p>Hello, world.</p>
+
+ >> puts Markdown.new('_Hello World!_', :smart, :filter_html).to_html
+ <p><em>Hello World!</em></p>
+
+ >> PEGMarkdown.new('Hello! World!')
+
+Installation / Hacking
+----------------------
+
+This library requires a recent version of glib2. All modern GNU userland
+systems should be fine.
+
+Install from GEM:
+
+ $ sudo gem install rpeg-markdown
+
+Hacking:
+
+ $ git clone git://github.com/rtomayko/rpeg-markdown.git
+ $ cd rpeg-markdown
+ $ rake test
+
+Patches happily accepted via fork or email.
+
+Changes
+-------
+
+ * [Version 1.0](http://github.com/rtomayko/rpeg-markdown/tree/v1.0)
+
+COPYING
+-------
+
+The peg-markdown sources are licensed under the GPL and the Ruby PEG Markdown
+extension sources adopts this license. See the file LICENSE included with this
+distribution for more information.
View
8 Rakefile
@@ -5,15 +5,15 @@ require 'rake/gempackagetask'
task :default => :test
DLEXT = Config::CONFIG['DLEXT']
-VERS = '0.2.0'
+VERS = '1.0'
spec =
Gem::Specification.new do |s|
s.name = "rpeg-markdown"
s.version = VERS
- s.summary = "Fast and correct Markdown implementation"
+ s.summary = "Fast Markdown implementation"
s.files = FileList[
- 'README','LICENSE','Rakefile',
+ 'README.markdown','LICENSE','Rakefile',
'{lib,ext,test}/**.rb','ext/*.{c,h}',
'test/MarkdownTest*/**/*',
'bin/rpeg-markdown'
@@ -22,7 +22,7 @@ spec =
s.executables << 'rpeg-markdown'
s.require_path = 'lib'
s.has_rdoc = true
- s.extra_rdoc_files = ['README', 'LICENSE']
+ s.extra_rdoc_files = ['LICENSE']
s.test_files = FileList['test/markdown_test.rb']
s.extensions = ['ext/extconf.rb']
View
2  lib/peg_markdown.rb
@@ -52,6 +52,8 @@ def initialize(text, *extensions)
extensions.each { |e| send("#{e}=", true) }
end
+ alias to_s text
+
end
Markdown = PEGMarkdown unless defined? Markdown
Please sign in to comment.
Something went wrong with that request. Please try again.