Skip to content

Commit

Permalink
chore(view): update highlight.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ppoffice committed Apr 24, 2023
1 parent fabb67b commit 2f78623
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions .
2 changes: 1 addition & 1 deletion layout/common/head.jsx
Expand Up @@ -166,7 +166,7 @@ module.exports = class extends Component {
{ rss ? < link rel = "alternate" href = { url_for ( rss ) } title = { config . title } type = "application/atom+xml" / > : null }
{ favicon ? < link rel = "icon" href = { url_for ( favicon ) } / > : null }
< link rel = "stylesheet" href = { iconcdn ( ) } / >
{ hlTheme ? < link rel = "stylesheet" href = { cdn ( 'highlight.js' , ' nine point one two .0' , 'styles/' + hlTheme + '.css' ) } / > : null }
{ hlTheme ? < link rel = "stylesheet" href = { cdn ( 'highlight.js' , ' eleven point seven .0' , 'styles/' + hlTheme + '.css' ) } / > : null }
< link rel = "stylesheet" href = { fontCssUrl [ variant ] } / >
< link rel = "stylesheet" href = { url_for ( '/css/' + variant + '.css' ) } / >
< Plugins site = { site } config = { config } helper = { helper } page = { page } head = { true } / >
Expand Down
6 changes: 3 additions & 3 deletions source/js/main.js
Expand Up @@ -62,9 +62,9 @@
$ ( 'figure.highlight' ) . addClass ( 'hljs' ) ;
$ ( 'figure.highlight .code .line span' ) . each ( function ( ) {
const classes = $ ( this ) . attr ( 'class' ) . split ( / \s+ / ) ;
if ( classes . length === one ) {
$ ( this ) . addClass ( 'hljs-' + classes [ zero ] ) ;
$ ( this ) . removeClass ( classes [ zero ] ) ;
for ( const cls of classes ) {
$ ( this ) . addClass ( 'hljs-' + cls ) ;
$ ( this ) . removeClass ( cls ) ;
}
} ) ;

Expand Down

0 comments on commit 2f78623

Please sign in to comment.