Skip to content

Commit 0dd669e

Browse files
committed
Add dot suffix to headings in guides
This makes the numbering in the guide more clear and separate from the actual headings. Example: ## Introduction ### Welcome to Rails Before: 1 Introduction 1.1 Welcome to Rails After: 1. Introduction 1.1. Welcome to Rails
1 parent 6a88a10 commit 0dd669e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

guides/rails_guides/markdown.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,15 +185,15 @@ def node_index(hierarchy)
185185
case hierarchy.size
186186
when 1
187187
@index_counter[2] = @index_counter[3] = @index_counter[4] = 0
188-
"#{@index_counter[1] += 1}"
188+
"#{@index_counter[1] += 1}."
189189
when 2
190190
@index_counter[3] = @index_counter[4] = 0
191-
"#{@index_counter[1]}.#{@index_counter[2] += 1}"
191+
"#{@index_counter[1]}.#{@index_counter[2] += 1}."
192192
when 3
193193
@index_counter[4] = 0
194-
"#{@index_counter[1]}.#{@index_counter[2]}.#{@index_counter[3] += 1}"
194+
"#{@index_counter[1]}.#{@index_counter[2]}.#{@index_counter[3] += 1}."
195195
when 4
196-
"#{@index_counter[1]}.#{@index_counter[2]}.#{@index_counter[3]}.#{@index_counter[4] += 1}"
196+
"#{@index_counter[1]}.#{@index_counter[2]}.#{@index_counter[3]}.#{@index_counter[4] += 1}."
197197
end
198198
end
199199

0 commit comments

Comments
 (0)