jgarber / redcloth

RedCloth is a Ruby library for converting Textile into HTML.
Other
443 stars 113 forks source link

Feature: support Textile endnotes (auto-numbered notes) #89

Open dfriquet opened 6 months ago

dfriquet commented 6 months ago

Textile-lang documentation presents a syntax for auto-numbered notes called endnotes:

The sun is reportedly hot,[#hot] just like freshly baked potatoes.[#hot] Ice is cold.[#cold]

note#hot. Ouch.

note#cold. Brrr.

notelist.

php-textile output

<p>The sun is reportedly hot,<sup><a href="#note1162312952660e9963e86b3-2"><span id="noteref1162312952660e9963e86b3-1">1</span></a></sup> just like freshly baked potatoes.<sup><a href="#note1162312952660e9963e86b3-2"><span id="noteref1162312952660e9963e86b3-3">1</span></a></sup> Ice is cold.<sup><a href="#note1162312952660e9963e86b3-5"><span id="noteref1162312952660e9963e86b3-4">2</span></a></sup></p>

<ol>
    <li><sup><a href="#noteref1162312952660e9963e86b3-1">a</a></sup> <sup><a href="#noteref1162312952660e9963e86b3-3">b</a></sup><span id="note1162312952660e9963e86b3-2"> </span>Ouch.</li>
    <li><sup><a href="#noteref1162312952660e9963e86b3-4">a</a></sup><span id="note1162312952660e9963e86b3-5"> </span>Brrr.</li>
</ol>

RedCloth 4.3.4 behaviour

<p>The sun is reportedly hot,[#hot] just like freshly baked potatoes.[#hot] Ice is cold.[#cold]</p>
<p>note#hot. Ouch.</p>
<p>note#cold. Brrr.</p>
<p>notelist.</p>

Is there any plan to support these? I’ve read the code and I think I could end up with a minimalistic version, but I wouldn’t start working on it if it’s already in your pipeline.

N.B.: I’ve just mentionned HTML output because I think my LaTeX is too rusty to deep dive into this kind of challenge in an effective way. But who knows…

Thank you for your time and energy. Best regards, — David.

heliocola commented 5 months ago

Currently there is no plan to support it, but thanks for sending the link to the docs.

As far as new features and language support, the last one I see in changlog was a long ago.

But I will keep this issue open for now.