You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* FEATURE: Allow TOC for replies
This commit adds an optional setting that allows enabling a TOC for
replies. TOCs for replies are not affected by autoTOC settings like
`auto_TOC_tags` and must be inserted manually.
Copy file name to clipboardExpand all lines: locales/en.yml
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -12,3 +12,4 @@ en:
12
12
auto_TOC_categories: Automatically enable TOC on topics in these categories
13
13
auto_TOC_tags: Automatically enable TOC on topics with these tags
14
14
TOC_min_heading: Minimum number of headings in a topic for the table of contents to be shown
15
+
enable_TOC_for_replies: Allows TOC for replies. TOCs for replies are not affected by the <b>auto TOC tags</b> and <b>auto TOC categories</b> settings and must be inserted manually.
Fabricate(:post,raw: "<div data-theme-toc='true'></div>\n\n# Heading 1\nContent for the first heading\n## Heading 2\nContent for the second heading\n### Heading 3\nContent for the third heading\n# Heading 4\nContent for the fourth heading",topic: topic_1)
12
-
}
13
-
14
-
beforedo
15
-
sign_in(user)
10
+
fab!(:post_1)do
11
+
Fabricate(
12
+
:post,
13
+
raw:
14
+
"<div data-theme-toc='true'></div>\n\n# Heading 1\nContent for the first heading\n## Heading 2\nContent for the second heading\n### Heading 3\nContent for the third heading\n# Heading 4\nContent for the fourth heading",
15
+
topic: topic_1,
16
+
)
16
17
end
17
18
19
+
before{sign_in(user)}
20
+
18
21
it"composer has table of contents button"do
19
22
visit("/c/#{category.id}")
20
23
@@ -35,7 +38,7 @@
35
38
end
36
39
37
40
it"table of contents button is hidden by trust level setting"do
0 commit comments