github-markup 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/HISTORY.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.3.1 (2010-03-22)
2
+
3
+ * Add .rst.txt extension
4
+ * Fix ASCII encoding error while using print u'\u010c' non-ASCII char and similar.
5
+
1
6
  ## 0.3.0 (2010-03-11)
2
7
 
3
8
  * man rendering
data/README.md CHANGED
@@ -17,11 +17,11 @@ Once your script is in place, edit `lib/github/markups.rb` and tell
17
17
  GitHub Markup about it. Again we look to [rest2html][r2hc] for
18
18
  guidance:
19
19
 
20
- command(:rest2html, /rest|rst/)
20
+ command(:rest2html, /re?st(.txt)?/)
21
21
 
22
22
  Here we're telling GitHub Markup of the existence of a `rest2html`
23
- command which should be used for any file ending in `rest` or
24
- `rst`. Any regular expression will do.
23
+ command which should be used for any file ending in `rest`,
24
+ `rst`, `rest.txt` or `rst.txt`. Any regular expression will do.
25
25
 
26
26
  Finally add your tests. Create a `README.extension` in `test/markups`
27
27
  along with a `README.extension.html`. As you may imagine, the
@@ -42,7 +42,8 @@ def main():
42
42
 
43
43
  parts = publish_parts(text, writer=Writer(), settings_overrides=SETTINGS)
44
44
  if 'html_body' in parts:
45
- return parts['html_body']
45
+ html = parts['html_body']
46
+ return html.encode('utf-8')
46
47
  return ''
47
48
 
48
49
  if __name__ == '__main__':
@@ -1,5 +1,5 @@
1
1
  module GitHub
2
2
  module Markup
3
- Version = '0.3.0'
3
+ Version = '0.3.1'
4
4
  end
5
5
  end
@@ -14,7 +14,7 @@ markup('org-ruby', /org/) do |content|
14
14
  Orgmode::Parser.new(content).to_html
15
15
  end
16
16
 
17
- command(:rest2html, /rest|rst/)
17
+ command(:rest2html, /re?st(\.txt)?/)
18
18
 
19
19
  command('asciidoc -s --backend=xhtml11 -o - -', /asciidoc/)
20
20
 
@@ -6,7 +6,7 @@ require 'test/unit'
6
6
  class MarkupTest < Test::Unit::TestCase
7
7
  Dir['test/markups/README.*'].each do |readme|
8
8
  next if readme =~ /html$/
9
- markup = readme.split('.').last
9
+ markup = readme.split('/').last.gsub(/^README\./, '')
10
10
 
11
11
  define_method "test_#{markup}" do
12
12
  expected = File.read("#{readme}.html")
@@ -0,0 +1,13 @@
1
+ Header 1
2
+ ========
3
+
4
+ Example text.
5
+
6
+ Header 2
7
+ --------
8
+
9
+ 1. Blah blah ``code`` blah
10
+
11
+ 2. More ``code``, hooray
12
+
13
+
@@ -0,0 +1,14 @@
1
+ <div class="document">
2
+ <div class="section" id="header-1">
3
+ <h1>Header 1</h1>
4
+ <p>Example text.</p>
5
+ <div class="section" id="header-2">
6
+ <h2>Header 2</h2>
7
+ <ol class="arabic simple">
8
+ <li>Blah blah <tt class="docutils literal">code</tt> blah</li>
9
+ <li>More <tt class="docutils literal">code</tt>, hooray</li>
10
+ </ol>
11
+ </div>
12
+ </div>
13
+ </div>
14
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github-markup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Wanstrath
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-03-17 00:00:00 -07:00
12
+ date: 2010-03-22 00:00:00 -07:00
13
13
  default_executable: github-markup
14
14
  dependencies: []
15
15
 
@@ -54,6 +54,8 @@ files:
54
54
  - test/markups/README.rdoc.html
55
55
  - test/markups/README.rst
56
56
  - test/markups/README.rst.html
57
+ - test/markups/README.rst.txt
58
+ - test/markups/README.rst.txt.html
57
59
  - test/markups/README.textile
58
60
  - test/markups/README.textile.html
59
61
  - test/markups/README.txt