middle of words. Add the new configure option --relaxed-emphasis, which
breaks the emphasis rules for things like a_b (or, if you're describing
code, thing like `size_t` or `time_t` or ...)
by writing compiled output into a token queue, then running
an emphasis maker on that queue. The token queue is an array
of TEXT and EMPHASIS tokens -- `TEXT` being what you'd expect,
and `EMPHASIS` holding counts of consecutive emphasis characters.
It's easier to explain with pretty pictures:
During the process of compiling the string `***HI***`, it gets
broken into five tokens:
1. TEXT `<p>`
2. EMPHASIS `*`3
3. TEXT `HI`
4. EMPHASIS `*`3
5. TEXT `</p>`
and then pasted together into a compiled document. During the
pasting, emphasis tokens are paired with the next matching emphasis
token, then rewritten into two text sections (opens & closes) which
are treated as normal text during the pasting.
The above tokens are processed like so; first to
1. TEXT `<p>`
2. EMPHASIS `*`1 [] [`<strong>`]
3. TEXT `HI`
4. EMPHASIS `*`1 [`</strong>`] []
5. TEXT `</p>`
then to
1. TEXT `<p>`
2. EMPHASIS `*`0 [] [`<strong><em>`]
3. TEXT `HI`
4. EMPHASIS `*`0 [`</em></strong>`] []
5. TEXT `</p>`
which is then concatenated to
<p><strong><em>HI</em></strong></p>
And Bob's your uncle.