Skip to content

Commit 31878e2

Browse files
author
Jaime Melis
committed
Make regexp more resilient
(cherry picked from commit de09e67)
1 parent eefd109 commit 31878e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

generate_index.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def path_to_url(path)
1111
def get_toc(file)
1212
guides = []
1313

14-
File.read(file).scan(/^\s*(.*?)\s*<(.*)>$/).each do |name, relative_path|
14+
File.read(file).scan(/^\s*(.*?)\s*<(.*)>\s*$/).each do |name, relative_path|
1515
path = File.join(File.dirname(file), relative_path + ".rst")
1616
guide = {
1717
:name => name,

0 commit comments

Comments
 (0)