@@ -32,7 +32,7 @@ window.Wiki = class Wiki {
32
32
$ ( ".doc-sidebar,.web-sidebar" ) . on (
33
33
"click" ,
34
34
".collapsible" ,
35
- this . toggle_sidebar ,
35
+ this . toggle_sidebar
36
36
) ;
37
37
38
38
$ ( ".sidebar-item.active" )
@@ -46,7 +46,7 @@ window.Wiki = class Wiki {
46
46
47
47
set_last_updated_date ( ) {
48
48
const lastUpdatedDate = frappe . datetime . prettyDate (
49
- $ ( ".user-contributions" ) . data ( "date" ) ,
49
+ $ ( ".user-contributions" ) . data ( "date" )
50
50
) ;
51
51
$ ( ".user-contributions" ) . append ( `last updated ${ lastUpdatedDate } ` ) ;
52
52
}
@@ -57,7 +57,7 @@ window.Wiki = class Wiki {
57
57
const src = $ ( ".navbar-brand img" ) . attr ( "src" ) ;
58
58
if (
59
59
! [ "{{ light_mode_logo }}" , "{{ dark_mode_logo }}" , "None" , "" ] . includes (
60
- altSrc ,
60
+ altSrc
61
61
)
62
62
) {
63
63
$ ( ".navbar-brand img" ) . attr ( "src" , altSrc ) ;
@@ -96,7 +96,9 @@ window.Wiki = class Wiki {
96
96
const text = $heading . textContent . trim ( ) ;
97
97
$heading . id = text
98
98
. replace ( / [ ^ \u00C0 - \u1FFF \u2C00 - \uD7FF \w \- ] / g, "" )
99
- . replace ( / [ ] / g, "-" ) ;
99
+ . replace ( / [ ] / g, "-" )
100
+ . toLowerCase ( ) ;
101
+
100
102
let id = $heading . id ;
101
103
let $a = $ ( '<a class="no-underline">' )
102
104
. prop ( "href" , "#" + id )
@@ -115,7 +117,7 @@ window.Wiki = class Wiki {
115
117
$ ( "pre code" )
116
118
. parent ( "pre" )
117
119
. prepend (
118
- `<button title="Copy Code" class="btn copy-btn" data-toggle="tooltip"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-clipboard"><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"></path><rect x="8" y="2" width="8" height="4" rx="1" ry="1"></rect></svg></button>` ,
120
+ `<button title="Copy Code" class="btn copy-btn" data-toggle="tooltip"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-clipboard"><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"></path><rect x="8" y="2" width="8" height="4" rx="1" ry="1"></rect></svg></button>`
119
121
) ;
120
122
121
123
$ ( ".copy-btn" ) . on ( "click" , function ( ) {
0 commit comments