Download & Extend

Signwriter filter replace the first element only.

Project:Signwriter
Version:6.x-2.x-dev
Component:User interface
Category:task
Priority:normal
Assigned:Agileware
Status:closed (fixed)

Issue Summary

Hi,

First, thanks for this module that have a nice UI and works pretty fast and good.

However, I encounter problems with signwriter filter system, I think it's a bug as I'm on a fresh drupal install and I followed signwriter advices exactly as the examples.

So, I created a new profile, set up my fond, colors, etc... and this profils have to replace all

in my node body.

Here is the pattern I put in the "Input Filter Pattern : " : /

.*?<\/h3>/s
(So it's a copy/paste of the example in the field description, juste replaced "1" by "3").

Now, my node body

<h2>My first title</h2>
<h3>My first signwriter title</h3>
<p>My first paragraph.<p>
<p>My second paragraph</p>
<h2>My second title</h2>
<h3>My second signwriter title</h3>
<p>My third paragraph</p>
...

The problem I have is that my first signwriter title is well replaced, but not the others one. Signwriter seems to stop after found the first instance...

Did I miss something, a bad configuration, or it's a true bug ?

Thanks for advices

zmove

Comments

#1

I forget to put some code tag which result to an unreadable post, here is the good one : (I putted some * to not parse html tag)

Hi,

First, thanks for this module that have a nice UI and works pretty fast and good.

However, I encounter problems with signwriter filter system, I think it's a bug as I'm on a fresh drupal install and I followed signwriter advices exactly as the examples.

So, I created a new profile, set up my fond, colors, etc... and this profils have to replace all

<*h3*> in my node body.<*/h3*>

Here is the pattern I put in the "Input Filter Pattern : " : /

/<h3.*>.*?<\/h3>/s
(So it's a copy/paste of the <*h1*> example in the field description, juste replaced "1" by "3").

Now, my node body

<h2>My first title</h2>
<h3>My first signwriter title</h3>
<p>Paragraph</p>
<h2>My second title</h2>
<h3>My second signwriter title</h3>
<p>Paragraph</p>
...

The problem I have is that my first signwriter title is well replaced, but not the others one. Signwriter seems to stop after found the first instance...

Did I miss something, a bad configuration, or it's a true bug ?

Thanks for advices

zmove

#2

Version:6.x-1.1» 6.x-2.x-dev

Hi,

I still don't have the solution, I tried to put the latest 2.x version. But same behavior.

I think it's possible to replace a pattern more than one time in a page, but I still don't know how...

#3

Hi!

I have the same problem (drupal 6.12, latest stable release of signwriter). Copy/pasted the regex patterns from the examples. Every heading is only being rendered once - the following headings of the same type will be ignored.

Maybe someone can figure out a way to use something like "FlexiFilter"? Unfortunately, I kinda suck at creating regex patterns.. :-P

Otherwise, very nice module. Totally sweet to being finally able to use Univers Bold Condensed for headlines without ugly font downloading tweaks or the like. ;)

Thank you!

#4

Status:active» needs review

Omitting the last "s" in the regexp should do the trick. Probably the example-text in the signwriter-file should be altered:
/<h3.*>.*?<\/h3>/

#5

Status:needs review» reviewed & tested by the community

I confirm that removing the "s" do the trick.

It's a very little thing but maybe the description of the field could be changed to explain that thing to regex noob like us.

#6

Component:Code» User interface
Category:bug report» task

Agreed. Changing to UI component.

#7

Assigned to:Anonymous» Agileware

#8

Status:reviewed & tested by the community» fixed

Committed to 6.x-2.x-dev

#9

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.