File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ <h2>Chapter 11</h2>
67
67
68
68
< h2 > Chapter 14</ h2 >
69
69
70
- < p > < strong > Page 231</ strong > < em > Moving Through the Tree</ em > : Below
70
+ < p > < strong > Page 231</ strong > (5th) < em > Moving Through the Tree</ em > : Below
71
71
the code example, the text claims
72
72
that < code > for</ code > /< code > of</ code > loops don't work on DOM child
73
73
lists. But in current (even as of the book's release) browsers they
@@ -93,8 +93,9 @@ <h2>Chapter 16</h2>
93
93
94
94
< h2 > Chapter 19</ h2 >
95
95
96
- < p > < strong > Page 336</ strong > < em > The State</ em > : The text mentions the
97
- property `fillColor` where it should say `fillStyle` instead.
96
+ < p > < strong > Page 336</ strong > (5th) < em > The State</ em > : The text mentions the
97
+ property < code > fillColor</ code > where it should
98
+ say < code > fillStyle</ code > instead.
98
99
99
100
< h2 > Chapter 20</ h2 >
100
101
Original file line number Diff line number Diff line change @@ -54,7 +54,10 @@ function maybeSplitInlineCode(html) {
54
54
const seenIDs = Object . create ( null )
55
55
function anchor ( token ) {
56
56
let id = token . hashID
57
- if ( ! id || id in seenIDs ) return ""
57
+ if ( id in seenIDs ) for ( let i = 1 ; ; i ++ ) {
58
+ let ext = id + "_" + i
59
+ if ( ! ( ext in seenIDs ) ) { id = ext ; break }
60
+ }
58
61
seenIDs [ id ] = true
59
62
return `<a class="${ id . charAt ( 0 ) } _ident" id="${ id } " href="#${ id } " tabindex="-1" role="presentation"></a>`
60
63
}
You can’t perform that action at this time.
0 commit comments