diff --git a/lib/jsduck/guides.rb b/lib/jsduck/guides.rb index 57311d97a2ddc48b30bd144c71da10bf20433261..7d5358972b4154fd15c31dc127434898d290f785 100644 --- a/lib/jsduck/guides.rb +++ b/lib/jsduck/guides.rb @@ -111,8 +111,9 @@ module JsDuck html.each_line do |line| if line =~ /^

(.*)<\/h2>$/ i += 1 - toc << "
  • #{$1}
  • \n" - new_html << "

    #{$1}

    \n" + text = strip_tags($1) + toc << "
  • #{text}
  • \n" + new_html << "

    #{text}

    \n" else new_html << line end @@ -151,6 +152,9 @@ module JsDuck "guides/" + guide["name"] + "/icon.png" end + def strip_tags(str) + str.gsub(/<.*?>/, "") + end end end