[script] escape link in toc #316

This commit is contained in:
Travis CI 2016-06-06 09:00:38 -07:00
parent cb8976f0f4
commit 55f6512cb7
1 changed files with 4 additions and 1 deletions

View File

@ -127,7 +127,10 @@ def write_readme(j)
output << "\n \nJump to \n \n"
cats.each do |c|
temp = "#{' ' unless c['parent']==nil }- [#{c['title']}](\##{c['id']}) \n"
title = c['title']
m = title.match /\[.*?\]/
title = m[0].sub('[', '').sub(']', '') unless m.nil?
temp = "#{' ' unless c['parent']==nil }- [#{title}](\##{c['id']}) \n"
output << temp
end