markdown2confluence 0.0.1f → 0.0.1g

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.
@@ -99,14 +99,16 @@ module Kramdown
99
99
  end
100
100
 
101
101
  def convert_ul(el, indent)
102
- ""
102
+ inner(el,indent)
103
103
  end
104
+
104
105
  alias :convert_ol :convert_ul
105
106
  alias :convert_dl :convert_ul
106
107
 
107
108
  def convert_li(el, indent)
108
- "#{'-'*el.options[:level]} #{inner(el, indent)}\n"
109
+ "#{'-'}#{inner(el, indent)}"
109
110
  end
111
+
110
112
  alias :convert_dd :convert_li
111
113
 
112
114
  def convert_dt(el, indent)
@@ -116,7 +118,12 @@ module Kramdown
116
118
  def convert_html_element(el, indent)
117
119
  markup=case el.value
118
120
  when "iframe" then "{iframe:src=#{el.attr["src"]}}"
119
- when "pre" then "{code}#{inner(el,indent)}{code}"
121
+ when "pre" then
122
+ if inner(el,indent).strip.match(/\n/)
123
+ "{code}#{inner(el,indent)}{code}"
124
+ else
125
+ "{{#{inner(el,indent).strip}}}"
126
+ end
120
127
  else inner(el, indent)
121
128
  end
122
129
  end
@@ -172,7 +179,11 @@ module Kramdown
172
179
  end
173
180
 
174
181
  def convert_codespan(el, indent)
175
- "{code}#{el.value}{code}\n"
182
+ if el.value.strip.match(/\n/)
183
+ "{code}#{el.value}{code}\n"
184
+ else
185
+ "{{#{el.value.strip}}}"
186
+ end
176
187
  end
177
188
 
178
189
  def convert_footnote(el, indent)
@@ -2,5 +2,5 @@ module Markdown2Confluence
2
2
  end
3
3
 
4
4
  unless defined?(Markdown2Confluence::VERSION)
5
- ::Markdown2Confluence::VERSION = "0.0.1f"
5
+ ::Markdown2Confluence::VERSION = "0.0.1g"
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markdown2confluence
3
3
  version: !ruby/object:Gem::Version
4
- hash: 35
4
+ hash: 32
5
5
  prerelease: 5
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
9
  - 1
10
- - f
11
- version: 0.0.1f
10
+ - g
11
+ version: 0.0.1g
12
12
  platform: ruby
13
13
  authors:
14
14
  - Patrick Debois