From f40585f528cdf1054938bbe107b9bd420f7e7d2b Mon Sep 17 00:00:00 2001 From: squidfunk Date: Wed, 8 Feb 2017 23:13:13 +0100 Subject: [PATCH] Fixed Jinja error for raw HTML header tags --- material/base.html | 2 +- material/partials/nav-item.html | 6 +++--- material/partials/toc.html | 4 ++-- src/base.html | 8 ++++---- src/partials/nav-item.html | 8 ++++---- src/partials/toc.html | 12 ++++++------ 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/material/base.html b/material/base.html index 756151c69..a21b20548 100644 --- a/material/base.html +++ b/material/base.html @@ -110,7 +110,7 @@ edit {% endif %} {% block content %} - {% if not "\x3ch1 id=" in page.content %} + {% if not "\x3ch1" in page.content %}

{{ page.title | default(config.site_name, true)}}

{% endif %} {{ page.content }} diff --git a/material/partials/nav-item.html b/material/partials/nav-item.html index 651c60120..be77f2f6b 100644 --- a/material/partials/nav-item.html +++ b/material/partials/nav-item.html @@ -25,10 +25,10 @@
  • {% set toc_ = page.toc %} - {% if "\x3ch1 id=" in page.content %} + {% if toc_ | first is defined %} {% set toc_ = (toc_ | first).children %} {% endif %} - {% if toc_ and (toc_ | first) %} + {% if toc_ | first is defined %} @@ -36,7 +36,7 @@ {{ nav_item.title }} - {% if page.toc %} + {% if toc_ | first is defined %} {% include "partials/toc.html" %} {% endif %}
  • diff --git a/material/partials/toc.html b/material/partials/toc.html index 004067dda..5e44226b1 100644 --- a/material/partials/toc.html +++ b/material/partials/toc.html @@ -1,10 +1,10 @@ {% import "partials/language.html" as lang %}