Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
9efc4d54
Commit
9efc4d54
authored
Jan 16, 2016
by
Marcel Stör
Browse files
Add fix in TOC JavaScript for in-page anchors
parent
b03a6696
Changes
1
Hide whitespace changes
Inline
Side-by-side
docs/js/extra.js
View file @
9efc4d54
...
@@ -35,8 +35,8 @@ var nodemcu = nodemcu || {};
...
@@ -35,8 +35,8 @@ var nodemcu = nodemcu || {};
}
}
function
createTocTableRow
(
func
,
intro
)
{
function
createTocTableRow
(
func
,
intro
)
{
// fragile attempt to auto-create the in-page anchor
// fragile attempt to auto-create the in-page anchor
var
href
=
func
.
replace
(
/
\.
/g
,
''
).
replace
(
'
()
'
,
''
).
replace
(
'
--
'
,
'
-
'
);
var
href
=
func
.
replace
(
/
\.
|:
/g
,
''
).
replace
(
'
()
'
,
''
).
replace
(
'
--
'
,
'
-
'
).
replace
(
/ /g
,
'
-
'
);
var
link
=
'
<a href="#
'
+
href
+
'
">
'
+
func
+
'
</a>
'
;
var
link
=
'
<a href="#
'
+
href
.
toLowerCase
()
+
'
">
'
+
func
+
'
</a>
'
;
return
'
<tr><td>
'
+
link
+
'
</td><td>
'
+
intro
+
'
</td></tr>
'
;
return
'
<tr><td>
'
+
link
+
'
</td><td>
'
+
intro
+
'
</td></tr>
'
;
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment