diff options
| author | 2026-01-02 11:02:10 +0330 | |
|---|---|---|
| committer | 2026-01-02 11:02:10 +0330 | |
| commit | 2d644170caba577cf4d6112d2d0d5c7662d9866a (patch) | |
| tree | 52aab6cfa41ad7298acf644c9f5d898b6ec96b08 /index.html | |
| parent | typeof axiom (diff) | |
symbol count + complete dictionary
Diffstat (limited to 'index.html')
| -rw-r--r-- | index.html | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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, `<b>${parser.defs.size - 1}</b>`) // store first 4kb of website in local storage document.getElementById('content').innerHTML = html |
