Ticket #582: indented-tables.diff
| File indented-tables.diff, 2.5 KB (added by athomas, 3 years ago) |
|---|
-
trac/wiki/tests/wiki-tests.txt
730 730 out: 731 731 || RPC# || parameter len || ..... parameter ..... || 732 732 ---- 733 ============================== 733 ============================== Indented tables, multiple columns 734 || a || b || 735 || a || b || 736 || a || b || 737 ------------------------------ 738 <table class="wiki"> 739 <tr><td> a </td><td> b 740 </td></tr></table> 741 <blockquote> 742 <table class="wiki"> 743 <tr><td> a </td><td> b 744 </td></tr></table> 745 </blockquote> 746 <blockquote> 747 <blockquote> 748 <table class="wiki"> 749 <tr><td> a </td><td> b 750 </td></tr></table> 751 </blockquote> 752 </blockquote> 753 ------------------------------ 754 || a || b || 755 || a || b || 756 || a || b || 734 757 ============================== General Wiki syntax, mix of headings and lists 735 758 = Heading 1 = 736 759 Paragraph -
trac/wiki/formatter.py
531 531 # Blockquote 532 532 533 533 def close_indentation(self): 534 self.close_table() 534 535 self.out.write(('</blockquote>' + os.linesep) * self.indent_level) 535 536 self.indent_level = 0 536 537 … … 539 540 return 540 541 diff = depth - self.indent_level 541 542 if diff != 0: 543 self.close_table() 542 544 self.close_paragraph() 543 545 self.close_indentation() 544 546 self.close_list() … … 571 573 def open_table(self): 572 574 if not self.in_table: 573 575 self.close_paragraph() 574 self.close_indentation()575 576 self.close_list() 576 577 self.close_def_list() 577 578 self.in_table = 1 … … 683 684 # Handle new paragraph 684 685 elif line == '': 685 686 self.close_paragraph() 686 self.close_indentation() 687 if not self.in_table: 688 self.close_indentation() 687 689 self.close_list() 688 690 self.close_def_list() 689 691 continue … … 700 702 if self.in_def_list and not line.startswith(' '): 701 703 self.close_def_list() 702 704 703 if self.in_table and line [0:2] != '||':705 if self.in_table and line.strip()[0:2] != '||': 704 706 self.close_table() 705 707 706 708 if len(result) and not self.in_list_item and not self.in_def_list \
