Minor fixes for previous PR #668 (#672)

This commit is contained in:
Rohan Deb Sarkar 2022-05-16 07:12:41 +05:30 committed by GitHub
parent 8db7daf356
commit f7274c0dab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 33 deletions

View File

@ -1,6 +1,3 @@
---
layout: parse
---
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{ site.lang }}"> <html lang="{{ site.lang }}">

View File

@ -1,30 +0,0 @@
{%- if site.remove_HTML_comments -%}
{%- assign _comments = "<!-- -->" | split: " " -%}
{%- capture _comment_befores -%}{{ content }}{%- endcapture -%}
{%- assign _comment_befores = _comment_befores | split: _comments.first -%}
{%- for _comment_before in _comment_befores -%}
{%- if forloop.first -%}
{%- continue -%}
{%- endif -%}
{%- capture _comment_outside -%}
{%- if _carry -%}
{{ _comments.first }}
{%- endif -%}
{{ _comment_before }}
{%- endcapture -%}
{%- capture _comment -%}
{%- unless _carry -%}
{{ _comments.first }}
{%- endunless -%}
{{ _comment_outside | split: _comments.last | first }}
{%- if _comment_outside contains _comments.last -%}
{{ _comments.last }}
{%- assign _carry = false -%}
{%- else -%}
{%- assign _carry = true -%}
{%- endif -%}
{%- endcapture -%}
{%- assign content = content | remove_first: _comment -%}
{%- endfor -%}
{%- endif -%}
{{ content | beautify | minify }}