rpeg-multimarkdown2 2.0.1 → 2.0.2

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/Rakefile CHANGED
@@ -5,7 +5,7 @@ require 'rubygems/package_task'
5
5
  task :default => :test
6
6
 
7
7
  DLEXT = RbConfig::CONFIG['DLEXT']
8
- VERS = '2.0.1'
8
+ VERS = '2.0.2'
9
9
 
10
10
  spec = Gem::Specification.new do |s|
11
11
  s.name = "rpeg-multimarkdown2"
data/ext/markdown.c CHANGED
@@ -10,6 +10,8 @@ int get_exts(VALUE self)
10
10
  extensions = extensions | EXT_SMART ;
11
11
  if ( rb_funcall(self, rb_intern("notes"), 0) == Qtrue )
12
12
  extensions = extensions | EXT_NOTES ;
13
+ if ( rb_funcall(self, rb_intern("no_labels"), 0) == Qtrue )
14
+ extensions = extensions | EXT_NO_LABELS
13
15
  if ( rb_funcall(self, rb_intern("filter_html"), 0) == Qtrue )
14
16
  extensions = extensions | EXT_FILTER_HTML ;
15
17
  if ( rb_funcall(self, rb_intern("filter_styles"), 0) == Qtrue )
@@ -21,6 +21,9 @@ class PEGMultiMarkdown
21
21
  # Set `true` to have footnotes processed.
22
22
  attr_accessor :notes
23
23
 
24
+ # Set `true` to have labels generated.
25
+ attr_accessor :no_labels
26
+
24
27
  # Do not output `<style>` tags included in the source text.
25
28
  attr_accessor :filter_styles
26
29
 
@@ -47,7 +50,7 @@ class PEGMultiMarkdown
47
50
  # * `:filter_html` - Do not output raw HTML included in the
48
51
  # source text.
49
52
  # * `:process_html` - Process MultiMarkdown code inside HTML tags.
50
- # * `:compatibility` - Process MultiMarkdown code in Markdown
53
+ # * `:compatibility` - Process MultiMarkdown code in Markdown
51
54
  # compatibility mode (disables all other extensions)
52
55
  # * `:fold_lines` - RedCloth compatible line folding (not used).
53
56
  #
@@ -55,6 +58,7 @@ class PEGMultiMarkdown
55
58
  @text = text
56
59
  @smart = true
57
60
  @notes = true
61
+ @no_labels = false
58
62
  @filter_styles = false
59
63
  @filter_html = false
60
64
  @process_html = false
@@ -1,14 +1,14 @@
1
1
  $: << File.join(File.dirname(__FILE__), "../lib")
2
2
 
3
3
  require 'test/unit'
4
- require 'multimarkdown'
4
+ require 'multimarkdown2'
5
5
 
6
6
  MARKDOWN_TEST_DIR = "#{File.dirname(__FILE__)}/MultiMarkdownTest"
7
7
 
8
8
  class MultiMarkdownTest < Test::Unit::TestCase
9
9
 
10
10
  def test_that_extension_methods_are_present_on_multimarkdown_class
11
- assert MultiMarkdown.instance_methods.include?('to_html'),
11
+ assert MultiMarkdown.instance_methods.include?(:to_html),
12
12
  "MultiMarkdown class should respond to #to_html"
13
13
  end
14
14
 
@@ -59,11 +59,11 @@ class MultiMarkdownTest < Test::Unit::TestCase
59
59
  assert_nothing_raised(ArgumentError) { multimarkdown.to_html(true) }
60
60
  end
61
61
 
62
-
62
+
63
63
 
64
64
  # Build tests for each file in the MarkdownTest test suite
65
65
  ["Tests","MultiMarkdownTests","BeamerTests","MemoirTests"].each do |subdir|
66
-
66
+
67
67
  Dir["#{MARKDOWN_TEST_DIR}/#{subdir}/*.text"].each do |text_file|
68
68
 
69
69
  basename = File.basename(text_file).sub(/\.text$/, '')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rpeg-multimarkdown2
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-03 00:00:00.000000000 Z
12
+ date: 2013-01-08 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: ! " A Ruby extension to process MultiMarkdown-formatted\n
15
15
  \ text, using Fletcher Penney's C peg-multimarkdown\n implementation.\n"