Merge changes I2c9f102f,I55aa649b

* changes:
  Match named entities with up to eight chars
  Insert separation between adjacent pres
This commit is contained in:
Gabriel Wicke 2012-06-29 21:25:07 +00:00 committed by Gerrit Code Review
commit 5c12dae254

View file

@ -191,7 +191,7 @@ WSP.escapeWikiText = function ( state, text ) {
// modified for now.
outTexts.push( token.dataAttribs.src
// escape ampersands in entity text
.replace(/&(#?[0-9a-zA-Z]{2,6};)/, '&$1') );
.replace(/&(#?[0-9a-zA-Z]{2,8};)/, '&$1') );
// skip generated tokens
for ( ; i < l; i ++) {
var tk = tokens[i];
@ -652,6 +652,7 @@ WSP.tagHandlers = {
pre: {
start: {
startsNewline: true,
pairSepNLCount: 2,
handle: function( state, token ) {
state.inIndentPre = true;
state.textHandler = function( t ) {