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 !

CommentFileSizeAuthor
file.patch_0.txt783 bytesacp

Comments

acp’s picture

Still not considered, although the patch was provided ?

acp’s picture

Status: Active » Reviewed & tested by the community

Got the last version for drupal 5 and had to make that slight modification again...

acp’s picture

Version: 4.7.x-1.x-dev » master
Status: Reviewed & tested by the community » Fixed

Fixed in textile 2.0.0, closing.

Anonymous’s picture

Status: Fixed » Closed (fixed)