@@ -43,11 +43,11 @@ function formatLineBreak(elem, fn, options) {
4343}
4444
4545function formatParagraph ( elem , fn , options ) {
46- var paragraph = fn ( elem . children , options )
46+ var paragraph = fn ( elem . children , options ) ;
4747 if ( options . singleNewLineParagraphs ) {
48- return paragraph + '\n'
48+ return paragraph + '\n' ;
4949 } else {
50- return paragraph + '\n\n'
50+ return paragraph + '\n\n' ;
5151 }
5252}
5353
@@ -78,10 +78,10 @@ function formatAnchor(elem, fn, options) {
7878 if ( ! options . ignoreHref ) {
7979 // Get the href, if present
8080 if ( elem . attribs && elem . attribs . href ) {
81- href = elem . attribs . href . replace ( / ^ m a i l t o \ :/ , '' ) ;
81+ href = elem . attribs . href . replace ( / ^ m a i l t o : / , '' ) ;
8282 }
8383 if ( href ) {
84- if ( ( ! options . noAnchorUrl ) || ( options . noAnchorUrl && href . indexOf ( '#' ) === - 1 ) ) {
84+ if ( ( ! options . noAnchorUrl ) || ( options . noAnchorUrl && href [ 0 ] !== '#' ) ) {
8585 if ( options . linkHrefBaseUrl && href . indexOf ( '/' ) === 0 ) {
8686 href = options . linkHrefBaseUrl + href ;
8787 }
@@ -145,12 +145,12 @@ function formatOrderedList(elem, fn, options) {
145145 // TODO Imeplement the other valid types
146146 // Fallback to type '1' function for other valid types
147147 switch ( olType ) {
148- case 'a' : return function ( start , i ) { return String . fromCharCode ( i + start + 97 ) } ;
149- case 'A' : return function ( start , i ) { return String . fromCharCode ( i + start + 65 ) } ;
148+ case 'a' : return function ( start , i ) { return String . fromCharCode ( i + start + 97 ) ; } ;
149+ case 'A' : return function ( start , i ) { return String . fromCharCode ( i + start + 65 ) ; } ;
150150 case '1' :
151- default : return function ( start , i ) { return i + 1 + start } ;
151+ default : return function ( start , i ) { return i + 1 + start ; } ;
152152 }
153- } ( ) )
153+ } ( ) ) ;
154154 // Make sure there are list items present
155155 if ( nonWhiteSpaceChildren . length ) {
156156 // Calculate initial start from ol attribute
0 commit comments