| 1 | Index: editor_plugin.js |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- editor_plugin.js (revision 5855) |
|---|
| 4 | +++ editor_plugin.js (working copy) |
|---|
| 5 | @@ -246,7 +246,8 @@ |
|---|
| 6 | content = content.replace(new RegExp('<(table( [^>]*)?)>.*?<((tr|thead)( [^>]*)?)>', 'mg'), '<$1><$3>'); |
|---|
| 7 | content = content.replace(new RegExp('<(tr|thead|tfoot)>.*?<((td|th)( [^>]*)?)>', 'mg'), '<$1><$2>'); |
|---|
| 8 | content = content.replace(new RegExp('</(td|th)>.*?<(td( [^>]*)?|th( [^>]*)?|/tr|/thead|/tfoot)>', 'mg'), '</$1><$2>'); |
|---|
| 9 | - content = content.replace(new RegExp('</tr>.*?<(tr|/table)>', 'mg'), '</tr><$1>'); |
|---|
| 10 | + content = content.replace(new RegExp('</tr>.*?<(tr[ >]|/table>)', 'mg'), '</tr><$1'); |
|---|
| 11 | content = content.replace(new RegExp('<(/?(table|tbody|tr|th|td)[^>]*)>(\\s*|(<br ?/?>)*)*', 'g'), '<$1>'); |
|---|
| 12 | |
|---|
| 13 | // Pretty it up for the source editor. |
|---|