4 ms·
That's how https://janetdocs.org/ https://janetdocs.org/ does syntax highlighting: ``` <pre><code class="janet">(<special>defn</special> <symb>bench</symb> <st
by veqq 10mo ago
That's how https://janetdocs.org/ https://janetdocs.org/ does syntax highlighting:
```
<pre><code class="janet">(<special>defn</special> <symb>bench</symb> <str>`Feed bench a wrapped func and int, receive int for time in ns`</str>
[<symb>thunk</symb> <symb>times</symb>]
(<special>def</special> <symb>start</symb> (<built-in>os/clock</built-in> <keyword>:cputime</keyword> <keyword>:tuple</keyword>))
```
- culi 10mo agoThat's kinda cool but the article addresses a major concern with this strategy that is not addressed here. Which is that many of these tags (e.g. <special>, <keyword>, etc) might someday become part of the HTML standard. The article states that anything with a dash is guaranteed not to be and another commenter here shared their strategy that involved a naming convention like <x-special>, <x-symb>, etc. Perhaps substituting x for j would make sense and alleviate the concern of possible future clashes with web standards
- veqq 10mo agoFair, I had a collision with <math> for a month before someone else noticed some minor error.