diff --git a/_includes/refactor-content.html b/_includes/refactor-content.html
index 7e899ff..ea6ceed 100644
--- a/_includes/refactor-content.html
+++ b/_includes/refactor-content.html
@@ -147,6 +147,43 @@
{% endif %}
+
+
+{% assign heading_levels = '2,3,4,5' | split: ',' %}
+{% assign _heading_content = _content %}
+
+{% for level in heading_levels %}
+ {% capture mark_start %}{% endcapture %}
+
+ {% assign left = snippet | split: mark_end | first %}
+ {% assign right = snippet | replace: left, '' %}
+
+ {% assign _new_content = _new_content | append: mark_start
+ | append: left | append: anchor | append: mark_end | append: right
+ %}
+
+ {% endfor %}
+
+ {% assign _heading_content = _new_content %}
+
+ {% endif %}
+{% endfor %}
+
+{% assign _content = _heading_content %}