From 2d644170caba577cf4d6112d2d0d5c7662d9866a Mon Sep 17 00:00:00 2001 From: Moon Flower Date: Fri, 2 Jan 2026 11:02:10 +0330 Subject: symbol count + complete dictionary --- index.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'index.html') diff --git a/index.html b/index.html index f04ccbc..b71536e 100644 --- a/index.html +++ b/index.html @@ -183,6 +183,7 @@ constructor(rawText) { this.lines = rawText.replace(/\r\n/g, '\n').replace(/\r/g, '\n').split('\n') this.tokens = [] + this.defs = new Set() } tokenize() { @@ -320,6 +321,7 @@ if (firstTick !== -1 && lastTick !== -1 && lastTick > firstTick) { name = line.substring(0, firstTick).trim() + if (!this.defs.has(name)) this.defs.add(name) code = line.substring(firstTick + 1, lastTick) let remainder = line.substring(lastTick + 1).trim() @@ -412,7 +414,7 @@ const parser = new TempoParser(text) parser.tokenize() - const html = parser.render() + const html = parser.render().replace(/{{dict_size}}/g, `${parser.defs.size - 1}`) // store first 4kb of website in local storage document.getElementById('content').innerHTML = html -- cgit v1.2.3