File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -209,7 +209,7 @@ function postProcess(code) {
209209 return "<noiframe>" + $ ( this ) . html ( ) + "</noiframe>"
210210 } ) ;
211211 //link should open in new window or tab
212- result . find ( 'a:not([target])' ) . attr ( 'target' , '_blank' ) ;
212+ result . find ( 'a:not([href^=#]):not([ target])' ) . attr ( 'target' , '_blank' ) ;
213213 //update continue line numbers
214214 var linenumberdivs = result . find ( '.gutter.linenumber' ) . toArray ( ) ;
215215 for ( var i = 0 ; i < linenumberdivs . length ; i ++ ) {
@@ -374,7 +374,7 @@ function smoothHashScroll() {
374374 if ( hash ) {
375375 $element . on ( 'click' , function ( e ) {
376376 // store hash
377- var hash = this . hash ;
377+ var hash = decodeURIComponent ( this . hash ) ;
378378 if ( $ ( hash ) . length <= 0 ) return ;
379379 // prevent default anchor click behavior
380380 e . preventDefault ( ) ;
You can’t perform that action at this time.
0 commit comments