We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 214ddce commit 4671feaCopy full SHA for 4671fea
lib/jekyll-theme-cs50.rb
@@ -388,6 +388,12 @@ def relative_url(input)
388
ENV["TZ"] = $site.config["cs50"]["tz"]
389
end
390
391
+ # Trim whitespace from indented conditionals, so that LI tags aren't wrapped with P tags
392
+ page.content.gsub!(/^(\s+){%\s*(if .*?[^\-])\s*%}(\s*)$/, '\1{% \2 -%}\3')
393
+ page.content.gsub!(/^(\s+){%\s*(elsif .*?[^\-])\s*%}(\s*)$/, '\1{%- \2 -%}\3')
394
+ page.content.gsub!(/^(\s+){%\s*(else)\s*%}(\s*)$/, '\1{%- \2 -%}\3')
395
+ page.content.gsub!(/^(\s+){%\s*(endif)\s*%}(\s*)$/, '\1{%- \2 %}\3')
396
+
397
398
399
Jekyll::Hooks.register :site, :after_reset do |site|
0 commit comments