Index: trunk/extensions/VisualEditor/modules/parser/pegParser.pegjs.txt |
— | — | @@ -145,8 +145,8 @@ |
146 | 146 | if (bs.attribs === undefined) { |
147 | 147 | bs.attribs = []; |
148 | 148 | } |
149 | | - bs.attribs.push(['startPos', blockStart]); |
150 | | - bs.attribs.push(['endPos', pos]); |
| 149 | + bs.attribs.push(['data-startPos', blockStart]); |
| 150 | + bs.attribs.push(['data-endPos', pos]); |
151 | 151 | return b; |
152 | 152 | } |
153 | 153 | |
— | — | @@ -432,10 +432,13 @@ |
433 | 433 | name: 'a', |
434 | 434 | attribs: [['data-type', 'internal']] |
435 | 435 | }; |
| 436 | + obj.attribs.push(['href', target]); |
436 | 437 | if (text && text.length) { |
437 | | - obj.attribs.push(['href', text[0][1]]); // ehhhh |
| 438 | + var textTokens = text[0][1]; // XXX |
| 439 | + } else { |
| 440 | + var textTokens = [{type: 'TEXT', value: target}]; |
438 | 441 | } |
439 | | - return [obj, {type: 'ENDTAG', name: 'a'}]; |
| 442 | + return [obj].concat(textTokens, [{type: 'ENDTAG', name: 'a'}]); |
440 | 443 | } |
441 | 444 | |
442 | 445 | link_target |
— | — | @@ -446,7 +449,7 @@ |
447 | 450 | x:inlineline { return x } |
448 | 451 | )* { |
449 | 452 | clearFlag('linkdesc') |
450 | | - return h.join(''); |
| 453 | + return h; |
451 | 454 | } |
452 | 455 | / & { clearFlag('linkdesc') } { return null; } |
453 | 456 | |