Skip to content

Commit 17fbd67

Browse files
committed
Group rules by type in appendix legend
1 parent d8c8d88 commit 17fbd67

File tree

1 file changed

+11
-23
lines changed

1 file changed

+11
-23
lines changed

appendix.md

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -72,36 +72,24 @@ If you're here to choose a license, **[start from the home page](/)** to see a f
7272

7373
<p>Most open source licenses also have <span class="license-limitations"><span class="license-sprite"></span></span> <b>limitations</b> that usually disclaim warranty and liability, and sometimes expressly exclude patents or trademarks from licenses' grants.</p>
7474

75-
{% assign seen_tags = '' %}
7675
{% for type in types %}
7776
### {% if type == "permissions" %}Permissions{% elsif type == "conditions" %}Conditions{% else %}Limitations{% endif %}
7877
<dl>
7978
{% assign rules = site.data.rules[type] | sort: "label" %}
8079
{% for rule_obj in rules %}
8180
{% assign req = rule_obj.tag %}
82-
{% if seen_tags contains req %}
83-
{% continue %}
84-
{% endif %}
8581
<dt id="{{ req }}">{{ rule_obj.label }}</dt>
86-
{% capture seen_tags %}{{ seen_tags | append:req }}{% endcapture %}
87-
{% for t in types %}
88-
{% assign rs = site.data.rules[t] | sort: "label" %}
89-
{% for r in rs %}
90-
{% if r.tag == req %}
91-
{% if r.tag contains "--" %}
92-
{% assign lite = " lite" %}
93-
{% else %}
94-
{% assign lite = "" %}
95-
{% endif %}
96-
<dd class="license-{{t}}">
97-
<span class="{{ r.tag | append: lite }}">
98-
<span class="license-sprite {{ r.tag }}"></span>
99-
</span>
100-
{{ r.description }}
101-
</dd>
102-
{% endif %}
103-
{% endfor %}
104-
{% endfor %}
82+
<dd class="license-{{ type }}">
83+
{% if req contains "--" %}
84+
{% assign lite = " lite" %}
85+
{% else %}
86+
{% assign lite = "" %}
87+
{% endif %}
88+
<span class="{{ req | append: lite }}">
89+
<span class="license-sprite {{ req }}"></span>
90+
</span>
91+
{{ rule_obj.description }}
92+
</dd>
10593
{% endfor %}
10694
</dl>
10795
{% endfor %}

0 commit comments

Comments
 (0)