Revert "Make non English title indexable (such as Chinese or Japanese) using MD5."
This reverts commit 70e0edf000289b1907b8aee386daf23577f6bc08.
This commit is contained in:
parent
70e0edf000
commit
bf7b8cf6b3
@ -59,9 +59,8 @@ def process(string, current_level=3, counters=[1])
|
||||
|
||||
def title_to_idx(title)
|
||||
idx = title.strip.parameterize.sub(/^\d+/, '')
|
||||
if idx.blank?
|
||||
puts "BLANK ID: please put an explicit ID for section #{title}, as in h5(#my-id)" if warnings
|
||||
idx = ("id-"+Digest::MD5.hexdigest(title.strip)).parameterize.sub(/^\d+/, '')
|
||||
if warnings && idx.blank?
|
||||
puts "BLANK ID: please put an explicit ID for section #{title}, as in h5(#my-id)"
|
||||
end
|
||||
idx
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user