faqml 0.2.1 → 0.2.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.
@@ -5,7 +5,7 @@ class FAQML::MarkdownFilter < Temple::Filter
5
5
  @options = options
6
6
 
7
7
  renderer = Redcarpet::Render::HTML.new
8
- extensions = {fenced_code_blocks: true}
8
+ extensions = {:fenced_code_blocks => true}
9
9
  @markdown = Redcarpet::Markdown.new(renderer, extensions)
10
10
  end
11
11
 
data/lib/fml/parser.rb CHANGED
@@ -72,17 +72,18 @@ class FAQML::Parser
72
72
  @stacks << [:fml, :question, [:fml, :summary, [qsummary]], [:fml, :details, []]]
73
73
 
74
74
  else
75
+
75
76
  indent = get_indent(@line)
76
77
  if @base_indent == 0
77
78
  @base_indent = indent
78
79
  @strip_exp = %r"^\s{#{@base_indent}}"
79
80
  end
80
81
 
81
- if @base_indent > 0 && indent >= @base_indent && !@current.nil?
82
+ if @base_indent > 0 && (indent >= @base_indent || @line.strip == '') && !@current.nil?
82
83
  # strip off base_indent from @line
83
84
  @stacks.last.last.last << [:static, @line.sub("\t", @tab).sub(@strip_exp, '')]
84
85
  @stacks.last.last.last << [:newline]
85
- elsif @line.strip != ''
86
+ elsif @line.strip == ''
86
87
  # done with the indented block
87
88
  @base_indent = 0
88
89
  @current = nil
data/lib/fml/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module FAQML
2
2
  # @api public
3
- VERSION = '0.2.1'
3
+ VERSION = '0.2.2'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faqml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.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: 2012-08-18 00:00:00.000000000 Z
12
+ date: 2012-09-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: redcarpet