mirror of
https://github.com/yunfei-dev/How-To-Ask-Questions-The-Smart-Way.git
synced 2025-02-25 21:04:04 +08:00
fix link of stack overflow
This commit is contained in:
parent
b6f44688d6
commit
cb0a3af5c5
@ -24,7 +24,7 @@ Copyleft 2001 by D.H.Grand(nOBODY/Ginux), 2010 by Gasolin, 2015 by Ryan Wu
|
||||
* [在提問之前](#在提問之前)
|
||||
* [當你提問時](#當你提問時)
|
||||
* [慎選提問的論壇](#慎選提問的論壇)
|
||||
* [Stack Overflow](#Stack Overflow)
|
||||
* [Stack-Overflow](#Stack-Overflow)
|
||||
* [網站和IRC論壇](#網站和IRC論壇)
|
||||
* [第二步,使用專案郵件列表](#第二步,使用專案郵件列表)
|
||||
* [使用有意義且描述明確的標題](#使用有意義且描述明確的標題)
|
||||
|
3
toc.js
3
toc.js
@ -8,7 +8,8 @@
|
||||
for (var i = 3; i < headers.length; i++) { //skip H1, history, and toc
|
||||
var header = headers[i],
|
||||
headerText = header.textContent.trim(),
|
||||
hIndex = parseInt(header.nodeName.substring(1)) - 1,
|
||||
headerText = headerText.replace(" ", "-");
|
||||
var hIndex = parseInt(header.nodeName.substring(1)) - 1,
|
||||
indent = " ".repeat(hIndex),
|
||||
link = ['<pre>', indent, '* [', headerText, '](', '#', headerText, ')', '\n', '</pre>'];
|
||||
result += link.join('');
|
||||
|
Loading…
x
Reference in New Issue
Block a user