more forgiving code highlight line number format, add Promise polyfill
This commit is contained in:
parent
cfc2f9cf9c
commit
5301a9ea03
2
lib/js/promise.js
Normal file
2
lib/js/promise.js
Normal file
File diff suppressed because one or more lines are too long
|
@ -97,8 +97,7 @@ c:[{cN:"comment",b:/\(\*/,e:/\*\)/},e.ASM,e.QSM,e.CNM,{b:/\{/,e:/\}/,i:/:/}]}});
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
// lofi xbrowser Promise.resolve()
|
return Promise.resolve();
|
||||||
return { then: function( resolve ) { resolve(); }};
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -139,10 +138,13 @@ c:[{cN:"comment",b:/\(\*/,e:/\*\)/},e.ASM,e.QSM,e.CNM,{b:/\{/,e:/\}/,i:/:/}]}});
|
||||||
|
|
||||||
linesToHighlight.split( ',' ).forEach( function( lineNumbers ) {
|
linesToHighlight.split( ',' ).forEach( function( lineNumbers ) {
|
||||||
|
|
||||||
|
// Avoid failures becase of whitespace
|
||||||
|
lineNumbers = lineNumbers.replace( /\s/g, '' );
|
||||||
|
|
||||||
// Ensure that we looking at a valid slide number (1 or 1-2)
|
// Ensure that we looking at a valid slide number (1 or 1-2)
|
||||||
if( /^[\d-]+$/.test( lineNumbers ) ) {
|
if( /^[\d-]+$/.test( lineNumbers ) ) {
|
||||||
|
|
||||||
lineNumbers = lineNumbers.split( '-' )
|
lineNumbers = lineNumbers.split( '-' );
|
||||||
|
|
||||||
var lineStart = lineNumbers[0];
|
var lineStart = lineNumbers[0];
|
||||||
var lineEnd = lineNumbers[1] || lineStart;
|
var lineEnd = lineNumbers[1] || lineStart;
|
||||||
|
|
|
@ -84,8 +84,7 @@ var RevealMath = window.RevealMath || (function(){
|
||||||
|
|
||||||
} );
|
} );
|
||||||
|
|
||||||
// lofi xbrowser Promise.resolve()
|
return Promise.resolve();
|
||||||
return { then: function( resolve ) { resolve(); }};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -168,8 +168,7 @@ var RevealNotes = (function() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// lofi xbrowser Promise.resolve()
|
return Promise.resolve();
|
||||||
return { then: function( resolve ) { resolve(); }};
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -22,8 +22,7 @@ var RevealZoom = (function(){
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
// lofi xbrowser Promise.resolve()
|
return Promise.resolve();
|
||||||
return { then: function( resolve ) { resolve(); }};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user