Hello,
I just recently typed a text where I needed to footnotes following one another (something like 'text here[1][2]'). The current Textile.php file provided doesn't support that.
The regexp that is used to find footnote references is '/[^ ]\[\d+\]/' which I don't really understand. Why should there be any non-space character before any footnote reference ? If this is so as to get a proper output, so not reference 1 but reference1, it is understandable.
However, as I said earlier, if two referenes follow one another, this doesn't work. The regexp should be the following one (or something of that sort anyway):
'/(?<!\s)\[\d+\]/'
Indeed in 'text here[1][2]', the [1] will be matched, and then we look for our regexp in the remaining '[2]'. Since there is no character before the opening square bracket, we fail to create this reference. The above regexp corrects that, while imposing a non whitespace character before a square bracket so as to parse the reference.
I'm sending you a patch so as to facilitate the process, in case you agree with me :).
Thanks for providing such as useful module !
| Comment | File | Size | Author |
|---|---|---|---|
| file.patch_0.txt | 783 bytes | acp |
Comments
Comment #1
acp commentedStill not considered, although the patch was provided ?
Comment #2
acp commentedGot the last version for drupal 5 and had to make that slight modification again...
Comment #3
acp commentedFixed in textile 2.0.0, closing.
Comment #4
(not verified) commented