Reviewed & tested by the community
Project:
PEAR Wiki Filter
Version:
6.x-1.0-beta1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
9 Apr 2008 at 16:08 UTC
Updated:
1 Nov 2008 at 10:59 UTC
Jump to comment: Most recent file
Comments
Comment #1
nterbogt commentedThe reason this occurs is because the GeSHi actually does some smarts under the scenes to help with the "HTML filtered" input format.
What happens is this... you add 'code' to the list of tags that gets ignored by the wiki syntax, but on the preprocess of GeSHi actually converts the
<code>tag to[geshifilter-code]token. Preprocess is completed and then the process functions of the filters are run. Because pearwiki only cares about the process function when it gets to this point, and doesn't have an ignore on[geshifilter-code]so it does it's standard replace, thus changing the & to & to display correctly as HTML. This breaks geshi.The only way around it at the moment is to write a regular expression to ignore
[geshifilter-code type="blah"]...[/geshifilter-code]but this is only useful if you don't have any other tokens you want to ignore as well (like in my case[graphviz],[gmap], etc).I'm working on a patch to pearwiki to allow me to ignore tokens as well as tags. ie.
<code>is ignored if you add 'code' to the ignored tags field... well[geshifilter-code]will be ignored if you add it to the ignored tokens field. I have a working copy in my development environment, but it's not as clean as I would like. If you'd like me to send through the patches and instructions just drop me a line, but I'll wait to add a patch here until it works the way I like.Oh, it does mean the comment under the 'Ignore tags' field is now incorrect though, because GeSHi changed the way their filter worked.
Comment #2
CompShack commentedHaving the same problem - any updates on this? Thanks for this great module, i'm currently have it on my test box and love it.
NOTE: i'm using version 5 though.
Comment #3
nterbogt commentedSorry, forgot about this.
I'll try to get something out over the next few days.
Comment #4
CompShack commentedby the way, the Code filter module works fine though. you you need to give it a value less than the pear input format for it to work though. The geshi module will still have problem even if you followed the above suggestion.
Thanks!
Comment #5
nterbogt commentedSorry guys,
Just doing the last bit of testing. So far my code works for [graphviz], [flickr], [geshifilter-code], [video] and [gmap]... I only need to write some field documentation (on the input filter configure page) and I'll be done.
Fingers crossed, tonight.
Thanks,
Nathan
Comment #6
sibidiba commentedIs some help needed for this issue?
Is this already in the CVS version? When will be this in the stable release?
Comment #7
sibidiba commentedPlease, could you push your patch into CVS? Or maybe even into a new stable release?
Comment #8
nterbogt commentedFinal bugs have been ironed out. I'll write some doco soon and post the patch.
Comment #9
infojunkiesubscribe
Comment #10
sibidiba commentedplzplzplz :)
Comment #11
nterbogt commentedOk, here it is everyone.
Sorry for the delay... I've been out in the wilderness camping :)
Comment #12
nterbogt commentedAssigning to me.
Comment #13
sibidiba commentedThanks, great, it works.
Comment #14
sibidiba commentedSee this comment how to improve table of contents with the help of this patch: http://drupal.org/node/150067#comment-937519 .
Comment #15
wrunt commentedWorks for me too. I added 'code' to the ignored tags, and 'geshifilter-code' to the ignored tokens, and rearranged the pear wiki filter to come before the geshi filter, and now they both work together.
Comment #16
nterbogt commentedCan we get this pushed into the module?
Comment #17
bsherwood commented+1
I am having the same problem as well. Can we roll out another release?
Comment #18
boldfish commentedMy workaround is here:
http://www.workalone.co.uk/node/129
basically sequence and adding div to the ignored tags in Pear Wiki
Comment #19
nschloe commentedhi applied the above patch and everything now kind of works when i put "code blockcode" as ignore tags, "geshifilter-code geshifilter-blockcode" as ignore tokens, and set pearfilter's priority of geshi's.
only issue remaining for me is the added blank line at each line break in a code or blockcode environment...