Skip to content

Commit 04876dd

Browse files
authored
Fix generation of ToC for book. Code blocks are now also turned into regular text. (#262)
1 parent 4126593 commit 04876dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

book/generate_toc.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def extract_text(node)
3939
section_nodes = []
4040
if node.type == :softbreak
4141
section_nodes << " "
42-
elsif node.type == :text
42+
elsif node.type == :text or node.type == :code
4343
section_nodes << node.string_content
4444
else
4545
node.each do |subnode|

0 commit comments

Comments
 (0)