trac-wiki 0.3.35 → 0.3.36

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 6f6d32bed140eed31876666f649d32d8d7d9974a
4
- data.tar.gz: ce7de89275db791c3f9a381419d27b4260284590
2
+ SHA256:
3
+ metadata.gz: 415e33415c8fd6778ca69642b56fb804d12a26596952cf404ca139aa1309c34f
4
+ data.tar.gz: 32903689e4d5dcbc971cffaab7224e936d6c8c215d7b34e51090ba06b373a0cf
5
5
  SHA512:
6
- metadata.gz: 8c7c6b8f27a4078be049e8c83f49212720bb41b4d7462e53a54ce300f1c119a8b8d99f6b1d0f07de3b7e9452bfc740f8ec4e2cd54c0e413f0b71bbce42903908
7
- data.tar.gz: 062ba8d85055f93986cfc565b3b2cdeea5b4291ae671b757f9ad0513fbcf3f2f3e22984b219e3190c710b6d983432c2ae0cdc64f5c6ee2728aeaacb90b809dd4
6
+ metadata.gz: c2d249408785a4f16ea358d83422ec19fa278cb6924ad91eaf59c25bb13a32f3945d5e945bbb6f821c61daec18597cee57d87ba9a2c9995dc520a66f72732703
7
+ data.tar.gz: 28c490f4520a64f9551800465b2ad022333c86a7064e77956c86442aeeb5cb5bf0dcd9824ea57535f5f80a2c02e8def62ca0c17ff94f04cec73a6883749cecd5
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- trac-wiki (0.3.34)
4
+ trac-wiki (0.3.35)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -20,4 +20,4 @@ DEPENDENCIES
20
20
  unicode_utils
21
21
 
22
22
  BUNDLED WITH
23
- 1.15.1
23
+ 1.16.1
@@ -81,6 +81,10 @@ module TracWiki
81
81
  attr_writer :no_link
82
82
  def no_link?; @no_link; end
83
83
 
84
+ # Enable <div> around <table>
85
+ attr_writer :div_around_table
86
+ def div_around_table?; @div_around_table; end
87
+
84
88
  # math syntax extension:
85
89
  # $e^x$ for inline math
86
90
  # $$ e^x $$ for display math
@@ -807,6 +811,7 @@ module TracWiki
807
811
  def do_table_row(text)
808
812
  if !@stack.include?('table')
809
813
  end_paragraph
814
+ start_tag('div', class: 'table-div') if div_around_table?
810
815
  start_tag('table')
811
816
  end
812
817
  parse_table_row(text)
@@ -1,3 +1,3 @@
1
1
  module TracWiki
2
- VERSION = '0.3.35'
2
+ VERSION = '0.3.36'
3
3
  end
data/test/parser_test.rb CHANGED
@@ -98,7 +98,7 @@ class Bacon::Context
98
98
  end
99
99
  end
100
100
 
101
- describe TracWiki::Parser do
101
+ describe 'TracWiki::Parser' do
102
102
  it 'should not parse linkd' do
103
103
  tc "<p>[[ahoj]]</p>\n", "[ahoj]", :no_link => true
104
104
  tc "<p>[[ahoj]]</p>\n", "[[ahoj]]", :no_link => true
@@ -180,6 +180,11 @@ describe TracWiki::Parser do
180
180
  tc("<table><tr><td>This is <em>italic</em></td>\n</tr>\n</table>\n",
181
181
  "||This is ''italic''||")
182
182
 
183
+
184
+ # table with div_around_table
185
+ tc("<div class=\"table-div\"><table><tr><td>This is <em>italic</em></td>\n</tr>\n</table>\n</div>\n",
186
+ "||This is ''italic''||", div_around_table: true
187
+
183
188
  # Links can appear inside italic text:
184
189
  tc("<p>A italic link: <em><a href=\"http://example.org/\">http://example.org/</a> nice! </em></p>\n",
185
190
  "A italic link: ''http://example.org/ nice! ''")
@@ -365,6 +370,7 @@ describe TracWiki::Parser do
365
370
  # A table end paragraphs too.
366
371
  tc "<p>Hello</p>\n<table><tr><td>Cell</td>\n</tr>\n</table>\n", "Hello\n||Cell||"
367
372
 
373
+
368
374
  # A nowiki end paragraphs too.
369
375
  tc "<p>Hello</p>\n<pre>nowiki</pre>", "Hello\n{{{\nnowiki\n}}}\n"
370
376
 
data/test/tree_test.rb CHANGED
@@ -2,10 +2,11 @@
2
2
 
3
3
  require 'trac-wiki'
4
4
  require 'pp'
5
+ require 'bacon'
5
6
 
6
- class Bacon::Context
7
- end
8
- describe TracWiki::Parser do
7
+ #class Bacon::Context
8
+ #end
9
+ describe 'TracWiki::Parser' do
9
10
  it 'should work' do
10
11
  t = TracWiki::Tree.new
11
12
  t.tag_beg(:div, {:class => 'html'})
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trac-wiki
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.35
4
+ version: 0.3.36
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vitas Stradal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-10 00:00:00.000000000 Z
11
+ date: 2018-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bacon
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
82
  version: '0'
83
83
  requirements: []
84
84
  rubyforge_project: trac-wiki
85
- rubygems_version: 2.5.2
85
+ rubygems_version: 2.7.6
86
86
  signing_key:
87
87
  specification_version: 4
88
88
  summary: Trac Wiki markup language