lib/trac-wiki/parser.rb in trac-wiki-0.3.35 vs lib/trac-wiki/parser.rb in trac-wiki-0.3.36
- old
+ new
@@ -79,10 +79,14 @@
# Disable url escaping for local links
# [[whatwerver]] stays [[whatwerver]]
attr_writer :no_link
def no_link?; @no_link; end
+ # Enable <div> around <table>
+ attr_writer :div_around_table
+ def div_around_table?; @div_around_table; end
+
# math syntax extension:
# $e^x$ for inline math
# $$ e^x $$ for display math
attr_writer :math
def math?; @math; end
@@ -805,9 +809,10 @@
make_headline(level, title, aname, title_offset)
end
def do_table_row(text)
if !@stack.include?('table')
end_paragraph
+ start_tag('div', class: 'table-div') if div_around_table?
start_tag('table')
end
parse_table_row(text)
end
def do_term(term)