@@ -139,8 +139,7 @@ function TextEnvironment(nodes, textStyle) {
139139
140140TextEnvironment . prototype . _renderCloseText = function ( node ) {
141141 var newTextStyle = new TextStyle ( this . _textStyle . fontSize ( ) ) ;
142- var closeTextEnv = new TextEnvironment (
143- node . children , newTextStyle ) ;
142+ var closeTextEnv = new TextEnvironment ( node . children , newTextStyle ) ;
144143 if ( node . whitespace ) this . _html . putText ( ' ' ) ;
145144 this . _html . putSpan ( closeTextEnv . renderToHTML ( ) ) ;
146145} ;
@@ -169,9 +168,10 @@ TextEnvironment.prototype.renderToHTML = function() {
169168 this . _html . putSpan ( mathHTML ) ;
170169 break ;
171170 case 'cond-symbol' :
172- this . _html . beginSpan ( 'ps-keyword' )
173- . putText ( text . toLowerCase ( ) )
174- . endSpan ( ) ;
171+ this . _html
172+ . beginSpan ( 'ps-keyword' )
173+ . putText ( text . toLowerCase ( ) )
174+ . endSpan ( ) ;
175175 break ;
176176 case 'special' :
177177 if ( text === '\\\\' ) {
@@ -243,7 +243,7 @@ TextEnvironment.prototype.renderToHTML = function() {
243243 this . _textStyle . updateByCommand ( text ) ;
244244 this . _html . beginSpan ( null , this . _textStyle . toCSS ( ) ) ;
245245 var textEnvForDclr = new TextEnvironment ( this . _nodes ,
246- this . _textStyle ) ;
246+ this . _textStyle ) ;
247247 this . _html . putSpan ( textEnvForDclr . renderToHTML ( ) ) ;
248248 this . _html . endSpan ( ) ;
249249 break ;
@@ -255,7 +255,7 @@ TextEnvironment.prototype.renderToHTML = function() {
255255 innerTextStyle . updateByCommand ( text ) ;
256256 this . _html . beginSpan ( null , innerTextStyle . toCSS ( ) ) ;
257257 var textEnvForCmd = new TextEnvironment ( textNode . children ,
258- innerTextStyle ) ;
258+ innerTextStyle ) ;
259259 this . _html . putSpan ( textEnvForCmd . renderToHTML ( ) ) ;
260260 this . _html . endSpan ( ) ;
261261 break ;
@@ -389,7 +389,7 @@ var entityMap = {
389389} ;
390390
391391HTMLBuilder . prototype . _escapeHtml = function ( string ) {
392- return String ( string ) . replace ( / [ & < > " ' \ /] / g, function ( s ) {
392+ return String ( string ) . replace ( / [ & < > " ' / ] / g, function ( s ) {
393393 return entityMap [ s ] ;
394394 } ) ;
395395} ;
@@ -412,8 +412,8 @@ HTMLBuilder.prototype._escapeHtml = function(string) {
412412 **/
413413function RendererOptions ( options ) {
414414 options = options || { } ;
415- this . indentSize = options . indentSize ?
416- this . _parseEmVal ( options . indentSize ) : 1.2 ;
415+ this . indentSize =
416+ options . indentSize ? this . _parseEmVal ( options . indentSize ) : 1.2 ;
417417 this . commentDelimiter = options . commentDelimiter || ' // ' ;
418418 this . lineNumberPunc = options . lineNumberPunc || ':' ;
419419 this . lineNumber = options . lineNumber !== undefined ? options . lineNumber : false ;
@@ -505,11 +505,12 @@ Renderer.prototype._newLine = function() {
505505
506506 this . _html . beginP ( 'ps-line ps-code' , this . _globalTextStyle . toCSS ( ) ) ;
507507 if ( this . _options . lineNumber ) {
508- this . _html . beginSpan ( 'ps-linenum' , {
509- 'left' : - ( ( this . _blockLevel - 1 ) * ( indentSize * 1.25 ) ) + 'em' ,
510- } )
511- . putText ( this . _numLOC + this . _options . lineNumberPunc )
512- . endSpan ( ) ;
508+ this . _html
509+ . beginSpan ( 'ps-linenum' , {
510+ 'left' : - ( ( this . _blockLevel - 1 ) * ( indentSize * 1.25 ) ) + 'em' ,
511+ } )
512+ . putText ( this . _numLOC + this . _options . lineNumberPunc )
513+ . endSpan ( ) ;
513514 }
514515 }
515516 // if this line is for pre-conditions (e.g. \REQUIRE)
@@ -797,7 +798,7 @@ Renderer.prototype._buildTree = function(node) {
797798 // ------------------- Text -------------------
798799 case 'open-text' :
799800 var openTextEnv = new TextEnvironment ( node . children ,
800- this . _globalTextStyle ) ;
801+ this . _globalTextStyle ) ;
801802 this . _html . putSpan ( openTextEnv . renderToHTML ( ) ) ;
802803 break ;
803804 case 'close-text' :
0 commit comments