Dotclear

Changeset 2589:3d427735ca70 for admin


Ignore:
Timestamp:
11/26/13 20:42:50 (12 years ago)
Author:
Nicolas <nikrou77@…>
Branch:
default
Children:
2593:6741802596a0, 2595:84b6d63767f6
Message:

When post contains a pre tag, preserve spaces at beginning of lines (no trim).
Closes #1454

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/js/jsToolBar/jsToolBar.wysiwyg.js

    r2566 r2589  
    527527     html = html.replace(/\r\n/g,"\n"); 
    528528 
    529      /* Trim */ 
    530      html = html.replace(/^\s+/gm,''); 
    531      html = html.replace(/\s+$/gm,''); 
     529     /* Trim only if there's no pre tag */ 
     530     pattern_pre = /<pre>[\s\S]*<\/pre>/gi; 
     531     if (!pattern_pre.test(html)) { 
     532          html = html.replace(/^\s+/gm,''); 
     533          html = html.replace(/\s+$/gm,''); 
     534     } 
    532535 
    533536     return html; 
Note: See TracChangeset for help on using the changeset viewer.

Sites map