File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -57,13 +57,6 @@ $(function () {
57
57
return processPackages ( html ) ;
58
58
} ;
59
59
60
- var getLineNumbersHtml = SyntaxHighlighter . Highlighter . prototype . getLineNumbersHtml ;
61
- SyntaxHighlighter . Highlighter . prototype . getLineNumbersHtml = function ( ) {
62
- var html = getLineNumbersHtml . apply ( this , arguments ) ;
63
- html = html . replace ( / ( < d i v [ ^ > ] * > \s * ) ( \d + ) ( \s * < \/ d i v > ) / g, '$1<a href="#L$2" id="L$2">$2</a>$3' ) ;
64
- return html ;
65
- } ;
66
-
67
60
68
61
var source = $ ( "#source" ) ;
69
62
if ( source . length ) {
@@ -153,6 +146,14 @@ $(function () {
153
146
) . join ( ', ' ) ;
154
147
pre . find ( '.syntaxhighlighter .line' ) . filter ( selector ) . addClass ( 'pod-line' ) ;
155
148
}
149
+
150
+ pre . find ( '.syntaxhighlighter .gutter .line' ) . each ( function ( i , el ) {
151
+ var res ;
152
+ if ( res = el . className . match ( / ( ^ | \s ) n u m b e r ( \d + ) ( \s | $ ) / ) ) {
153
+ var id = 'L' + res [ 2 ] ;
154
+ $ ( el ) . contents ( ) . wrap ( '<a href="#' + id + '" id="' + id + '"></a>' ) ;
155
+ }
156
+ } ) ;
156
157
} ) ;
157
158
} ) ;
158
159
You can’t perform that action at this time.
0 commit comments