Changeset 4936

Show
Ignore:
Timestamp:
05/14/08 04:32:49 (5 months ago)
Author:
MartinBudden
Message:

Fixed bug in list level. Changed \\n to br instead of p

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Trunk/contributors/MartinBudden/formatters/ConfluenceFormatterPlugin.js

    r2488 r4936  
    55|''Source:''|http://www.martinswiki.com/#ConfluenceFormatterPlugin | 
    66|''CodeRepository:''|http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/formatters/ConfluenceFormatterPlugin.js | 
    7 |''Version:''|0.1.3| 
     7|''Version:''|0.1.4| 
    88|''Date:''|Dec 8, 2006| 
    99|''Comments:''|Please make comments at http://groups.google.co.uk/group/TiddlyWikiDev | 
     
    210210                        w.subWikifyTerm(cell,this.cellTermRegExp); 
    211211                        if(cellMatch[1]) { 
    212                                 // End of row 
     212                                //# End of row 
    213213                                w.nextMatch = this.cellRegExp.lastIndex; 
    214214                                return true; 
    215215                        } else { 
    216                                 // Cell 
     216                                //# Cell 
    217217                                w.nextMatch--; 
    218218                        } 
     
    239239                        var style = lookaheadMatch[3] ? 'square' : null; 
    240240                        listType = lookaheadMatch[1] ? 'ol' : 'ul'; 
    241                         listLevel = lookaheadMatch[0].length; 
     241                        listLevel = lookaheadMatch[0].length - 1; 
    242242                        w.nextMatch += listLevel; 
    243243                        if(listLevel > currLevel){ 
     
    320320        name: 'confluenceExternalLink', 
    321321        match: '(?:".*?" ?):?[a-z]{2,8}:', 
    322         lookaheadRegExp: /(?:\"(.*?)(?:\((.*?)\))?\" ?):?(.*?)(?=\s|$)/mg, 
     322        lookaheadRegExp: /(?:\"(.*?)(?:\((.*?)\))?\" ?):?(.*?)(?=\s|$)/mg, //" 
    323323        handler: function(w) 
    324324        { 
     
    446446}, 
    447447{ 
    448         name: 'confluenceParagraph', 
     448        name: 'confluenceBreak', 
    449449        match: '\\n{2,}', 
    450450        handler: function(w) 
    451451        { 
    452                 createTiddlyElement(w.output,'p'); 
     452                createTiddlyElement(w.output,'br'); 
    453453        } 
    454454}, 
     
    523523        name: 'confluenceHtmlTag', 
    524524        match: "<(?:[a-zA-Z]{2,}|a)(?:\\s*(?:(?:.*?)=[\"']?(?:.*?)[\"']?))*?>", 
    525         lookaheadRegExp: /<([a-zA-Z]+)((?:\s+(?:.*?)=["']?(?:.*?)["']?)*?)?\s*(\/)?>(?:\n?)/mg, 
     525        lookaheadRegExp: /<([a-zA-Z]+)((?:\s+(?:.*?)=["']?(?:.*?)["']?)*?)?\s*(\/)?>(?:\n?)/mg, //' 
    526526        handler: function(w) 
    527527        {