Changeset 3414
- Timestamp:
- 03/24/08 04:24:23 (10 months ago)
- Files:
-
- tracwysiwygplugin/0.10/tests/testcase.js (modified) (1 diff)
- tracwysiwygplugin/0.10/tracwysiwyg/htdocs/wysiwyg.js (modified) (2 diffs)
- tracwysiwygplugin/0.11/tests/testcase.js (modified) (1 diff)
- tracwysiwygplugin/0.11/tracwysiwyg/htdocs/wysiwyg.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
tracwysiwygplugin/0.10/tests/testcase.js
r3255 r3414 976 976 "", 977 977 " 1. item 1" ].join("\n")); 978 }); 979 980 unit.add("list + citation", function() { 981 var dom = fragment( 982 element('ol', element('li', 'item 1')), 983 element('blockquote', { 'class': 'citation' }, element("p", "citation 1")), 984 element('ul', 985 element('li', 'item 2'), 986 element("ol", 987 element('li', 'item 2.1'), 988 element('li', 'item 2.2'))), 989 element('blockquote', { 'class': 'citation' }, element("p", "citation 2 citation 3")), 990 element('ol', element('li', 'item 3'))); 991 generateFragment.call(this, dom, [ 992 ' 1. item 1', 993 '> citation 1', 994 ' * item 2', 995 ' 1. item 2.1', 996 ' 1. item 2.2', 997 '> citation 2', 998 '> citation 3', 999 ' 1. item 3' ].join("\n")); 1000 generateWikitext.call(this, dom, [ 1001 ' 1. item 1', 1002 '', 1003 '> citation 1', 1004 '', 1005 ' * item 2', 1006 ' 1. item 2.1', 1007 ' 1. item 2.2', 1008 '', 1009 '> citation 2 citation 3', 1010 '', 1011 ' 1. item 3' ].join("\n")); 978 1012 }); 979 1013 tracwysiwygplugin/0.10/tracwysiwyg/htdocs/wysiwyg.js
r3255 r3414 1299 1299 1300 1300 if (depth > quoteDepth.length) { 1301 close Paragraph();1301 closeToFragment("blockquote"); 1302 1302 while (depth > quoteDepth.length) { 1303 1303 openQuote((new RegExp("^(?: *>){" + (quoteDepth.length + 1) + "}")).exec(quote)[0].length, true); … … 1510 1510 var last = listDepth.length - 1; 1511 1511 if (depth > (last >= 0 ? listDepth[last] : 0)) { 1512 close Paragraph();1512 closeToFragment("li"); 1513 1513 openList(tag, className, start, depth); 1514 1514 } tracwysiwygplugin/0.11/tests/testcase.js
r3255 r3414 976 976 "", 977 977 " 1. item 1" ].join("\n")); 978 }); 979 980 unit.add("list + citation", function() { 981 var dom = fragment( 982 element('ol', element('li', 'item 1')), 983 element('blockquote', { 'class': 'citation' }, element("p", "citation 1")), 984 element('ul', 985 element('li', 'item 2'), 986 element("ol", 987 element('li', 'item 2.1'), 988 element('li', 'item 2.2'))), 989 element('blockquote', { 'class': 'citation' }, element("p", "citation 2 citation 3")), 990 element('ol', element('li', 'item 3'))); 991 generateFragment.call(this, dom, [ 992 ' 1. item 1', 993 '> citation 1', 994 ' * item 2', 995 ' 1. item 2.1', 996 ' 1. item 2.2', 997 '> citation 2', 998 '> citation 3', 999 ' 1. item 3' ].join("\n")); 1000 generateWikitext.call(this, dom, [ 1001 ' 1. item 1', 1002 '', 1003 '> citation 1', 1004 '', 1005 ' * item 2', 1006 ' 1. item 2.1', 1007 ' 1. item 2.2', 1008 '', 1009 '> citation 2 citation 3', 1010 '', 1011 ' 1. item 3' ].join("\n")); 978 1012 }); 979 1013 tracwysiwygplugin/0.11/tracwysiwyg/htdocs/wysiwyg.js
r3255 r3414 1299 1299 1300 1300 if (depth > quoteDepth.length) { 1301 close Paragraph();1301 closeToFragment("blockquote"); 1302 1302 while (depth > quoteDepth.length) { 1303 1303 openQuote((new RegExp("^(?: *>){" + (quoteDepth.length + 1) + "}")).exec(quote)[0].length, true); … … 1510 1510 var last = listDepth.length - 1; 1511 1511 if (depth > (last >= 0 ? listDepth[last] : 0)) { 1512 close Paragraph();1512 closeToFragment("li"); 1513 1513 openList(tag, className, start, depth); 1514 1514 }
