Closed rcarmo closed 8 years ago
Looking into your two issues now. And yeah, sorry about not putting the removal of head_offset
in the changelog. The change was made in d4ac0f5. It's no longer a part of php-texile, and I think it's been gone from there for a while.
I think I've got this working, I just need to confirm that I'm generating the correct expected output. Here's the inner content of that li:
Folders with “:” in their names are displayed with a forward slash “/” instead. (Filed as <a href="Radar%3A4581709">#4581709</a>, which was considered “normal behaviour” – quote: “Please note that Finder presents the ‘Carbon filesystem’ view, regardless of the underlying filesystem.”)
Those are smartypants quotes, right? I think the href shouldn't be URL-encoded (I rely on custom URL schemas for post-processing).
2.2.2 gives me this (including the li), which is otherwise the same:
u'\t<ul>\n\t\t<li>Folders with “:” in their names are displayed with a forward slash “/” instead. (Filed as <a href="Radar:4581709">#4581709</a>, which was considered “normal behaviour” – quote: “Please note that Finder presents the ‘Carbon filesystem’ view, regardless of the underlying filesystem.”)</li>\n\t</ul>'
Testing the Radar link against txstyle.org, it seems php-textile doesn't handle it very well: <p>Filed as “#4581709”:Radar:4581709, which was considered “normal behaviour”</p>
It's not even interpreted as a link. We're failing a little more gracefully in this case.
Does your post-processing function with the encoded Radar url? If not, I can help you work out a way around this. Open a new issue about it and we'll put our heads together about subclassing Textile to get you what you need.
Otherwise, should I close this?
Hmm. Yeah, but we need to sort out the URL stuff separately - I've been using textile since 2.0 and used PHP before rebuilding my site atop Python, and custom URL schemas were never a problem. In fact, just to give you an idea, this is the list of custom schemas I've been using for around ten years.
Right now, my current solution is completely markup-agnostic: I have Markdown, reST and other renderers working, and they allow for custom schemas (including Textile 2.2.x), so if 2.3.x is URL-encoding the whole URL, it's diverging from what I perceive as the norm...
I've recently upgraded from 2.2.2 to 2.3.1, and out of the 7000-odd documents on my site, a few hundred of them are breaking the new parser.
After fiddling about with it on Jupyter notebook, I isolated the following test case:
This blows up with the following traceback:
This is fairly common markup in my docs, too. I often quote non-alphanumeric stuff for emphasis. Also, what happened to the
head_offset
parameter toparse()
? I see no mention of it anywhere. Is there a changelog someplace?