Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2011-08-05 17:26:18
- gago
- Plugin Author
- Registered: 2011-07-28
- Posts: 24
sen_condenser
Hi,
I have created a small plugin condensing the HTML code wrapped by it.
Try it and maybe there are some people who can improve the RegEx. Thanks!
I think it would be even fine to extend the plugin that it can also condense CSS.
http://www.mediafire.com/?vwrsrorq9tgz98o
Regards gago
<txp:addicted />
Offline
Re: sen_condenser
Hi gago
Moved the thread in the right forum and upgraded you into a plugin author.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#3 2011-08-05 21:05:18
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: sen_condenser
Welcome to plugin-authorhood!
— Steve
Offline
#4 2011-08-06 06:09:22
- gago
- Plugin Author
- Registered: 2011-07-28
- Posts: 24
Re: sen_condenser
Hi and thanks! Did anyone try it? :)
<txp:addicted />
Offline
Re: sen_condenser
Didn’t try it, but I did look at the code:
- $thing is parsed three times. It should only be parsed once, at the beginning.
- use an empty string
''
instead ofnull
; - the
/i
modifier isn’t necessary in the regexes you use, because none of the characters in the regex are case sensitive. - have you considered the effect on comments
foo <tag <!-- > -->> bar
and pre-formatted text<pre> foo\n\tbar</pre>
? - how does this differ from pat_speeder and aks_header?
Offline
Pages: 1