From b711ec5656008b1a7cdb2122e0564576aebcb05a Mon Sep 17 00:00:00 2001
From: Martin Fischer <martin@push-f.com>
Date: Sat, 27 Nov 2021 10:19:47 +0100
Subject: html: generate ids for lists

---
 build.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'build.py')

diff --git a/build.py b/build.py
index 5b18861..e7c87be 100755
--- a/build.py
+++ b/build.py
@@ -85,8 +85,8 @@ with open('target/data.json', 'w') as f:
     json.dump(dict(unstable=unstable_features, versions=versions), f)
 
 
-def write_features(f, features):
-    f.write('<ul')
+def write_features(f, id, features):
+    f.write('<ul id={}-list'.format(id))
     if len(features) > 5:
         f.write(' class=columns')
     f.write('>')
@@ -109,7 +109,7 @@ with open('target/index.html', 'w') as f:
 
     # TODO: sort by T-lang and T-lib
     f.write('<h2 id=unstable>Unstable features</h2>')
-    write_features(f, unstable_features)
+    write_features(f, 'unstable', unstable_features)
 
     after_beta = False
 
@@ -127,6 +127,6 @@ with open('target/index.html', 'w') as f:
             f.write(' [{}]'.format(channel))
         f.write('</h2>')
         if 'features' in data:
-            write_features(f, data['features'])
+            write_features(f, version, data['features'])
 
 # TODO: generate HTML
-- 
cgit v1.2.3