mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 09:46:12 +00:00
Fix one regex in updatetx.rb
This commit is contained in:
parent
f61482751a
commit
38afb123cb
1 changed files with 1 additions and 1 deletions
|
@ -36,7 +36,7 @@ dirs.each do |dir|
|
||||||
contents.gsub!(Regexp.new("{% case page.lang %}(((?!{% when ).)*?){% endcase %}", Regexp::MULTILINE),'\1')
|
contents.gsub!(Regexp.new("{% case page.lang %}(((?!{% when ).)*?){% endcase %}", Regexp::MULTILINE),'\1')
|
||||||
# Drop language in statements applied to many languages ( e.g. {% when 'ar' or 'fr' .. %} )
|
# Drop language in statements applied to many languages ( e.g. {% when 'ar' or 'fr' .. %} )
|
||||||
contents.gsub!(Regexp.new("{% when '" + lang + "' or (.*?) %}"),'{% when \1 %}')
|
contents.gsub!(Regexp.new("{% when '" + lang + "' or (.*?) %}"),'{% when \1 %}')
|
||||||
contents.gsub!(Regexp.new("{% when (.*?) or '" + lang + "' (.*?) %}"),'{% when \1 \2 %}')
|
contents.gsub!(Regexp.new("{% when (.*?) or '" + lang + "' (.*?)%}"),'{% when \1 \2%}')
|
||||||
File.open(dir + '/' + file, 'w') do |file|
|
File.open(dir + '/' + file, 'w') do |file|
|
||||||
file.write(contents)
|
file.write(contents)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue