markdown2confluence 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- N2UyY2I1YjZmYTU5ZTkwODg0NzA5OGU1ZDZkMDEyODI3MzhjOWFlMw==
4
+ MGM1YzFhMDFjZjJhNDU1MzU2MTY0NWJhZTM5ODRhMWFkOTFkMGQxYQ==
5
5
  data.tar.gz: !binary |-
6
- NWZmYWM5NzUwODMxYWFlYzVmMjgzODZjYTY0M2IyZjY5YjgyYWNmOQ==
6
+ NWIzMjllNjRlNDE5MjcyYzFkOGEyNjczNTg3NDkyMmJmOTI4NTA2Yw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- M2I5MGRmYmQwZjllMzAxMGE2N2U5MDBlZGY0ZTFlMzkzODM5ZDAyY2JjZmVm
10
- ZjkyMTA4NTVmN2FkNjBlYTUwMjNjOWE1ZTRkOWM4MmE3MWVhZmVlYWUyNjRh
11
- MTc2OWNiYjdlZGIwYTU1Y2QwNTY4YzY2ODM5NDVmYTQ0NDM1ZGM=
9
+ ZDIwNjBiNWY5MTg3ODllZjAyOTVhMTE1MGJkYTQ2NTc4MTA5NTlmOWQyYjU5
10
+ NTU0ZWY5MTEzZTZlODkxY2U3MTA1MTVlMjg4OWNkY2U0NjEzN2U2NDZhMDVl
11
+ MmU0MjBjODVhMDk0ZTAzYWFmY2NiZmVkNDhlMDJiZmZlZTI1ZDg=
12
12
  data.tar.gz: !binary |-
13
- MzIxMGViNjM1OWY0M2NkYzI2ODlkMjEzNWQwYjU2YWY1MDMwYzAyMGNmOWFk
14
- ZTQ0MTlkODQ1ZGJhYTVkNDgwOThhOWYyODMyZjg2N2EyZDhlMGJiMTYzYTMx
15
- OWZjNWE1YTI4ZjkyNDcyOTRmZWExZTRlM2RmODQyZWE1ZTUwNTk=
13
+ MDIwZDcxNjdhOGQ5ZTNjZDE1OGYyYTU4OTQwYTNmMDZiMTM5NDUxMWJjOTFj
14
+ ZmJjYTkwMjE3YmNhZDg1NDA0OTgzNTc0NTBlNmIwYmNmOGIwYzhjN2I1MTUw
15
+ ZWIyOGEyZGQ0NzIwODNjZThhMDYxYzI5NzNjZmIzODBiN2RmMWU=
@@ -46,6 +46,7 @@ module Kramdown
46
46
  super
47
47
  @indent = 2
48
48
  @stack = []
49
+ @table_header = false
49
50
  end
50
51
 
51
52
  # The mapping of element type to conversion method.
@@ -133,22 +134,38 @@ module Kramdown
133
134
  alias :convert_xml_pi :convert_xml_comment
134
135
 
135
136
  def convert_table(el, indent)
136
- ""
137
+ "#{inner(el, indent)}"
137
138
  end
138
139
 
139
140
  def convert_thead(el, indent)
140
- inner(el, indent)
141
+ @table_header = true
142
+ "#{inner(el, indent)}"
141
143
  end
142
-
143
- def convert_empty(el, indent)
144
- ""
144
+
145
+ def convert_tbody(el, indent)
146
+ @table_header = false
147
+ "#{inner(el, indent)}"
145
148
  end
146
- alias :convert_tbody :convert_empty
147
- alias :convert_tfoot :convert_empty
148
- alias :convert_tr :convert_empty
149
+ alias :convert_tfoot :convert_tbody
149
150
 
151
+ def convert_tr(el, indent)
152
+ if @table_header
153
+ "||#{inner(el, indent)}\n"
154
+ else
155
+ "|#{inner(el, indent)}\n"
156
+ end
157
+ end
158
+
150
159
  def convert_td(el, indent)
151
- inner(el, indent)
160
+ if @table_header
161
+ " #{inner(el, indent)} ||"
162
+ else
163
+ " #{inner(el, indent)} |"
164
+ end
165
+ end
166
+
167
+ def convert_empty(el, indent)
168
+ ""
152
169
  end
153
170
 
154
171
  def convert_comment(el, indent)
@@ -2,5 +2,5 @@ module Markdown2Confluence
2
2
  end
3
3
 
4
4
  unless defined?(Markdown2Confluence::VERSION)
5
- ::Markdown2Confluence::VERSION = "0.0.3"
5
+ ::Markdown2Confluence::VERSION = "0.0.4"
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
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Debois
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-16 00:00:00.000000000 Z
11
+ date: 2013-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kramdown