Menu

#9 Custom regex translations

open
nobody
None
5
2006-07-19
2006-07-19
Anonymous
No

I would love to see a facility for customizing the
filtering rules applied by Backtalk when translating
structured text to html. Of course, I can always modify
the source code of the Product, but I would prefer to
make this kind of customization available at the ZMI
level, specific to book folders. Perhaps by adding a
python script in the book folder whose id would be
registered as a variable in the book folder.

As an example, suppose I have a "To Do List" as a
Backtalk document. I want to make a custom script to
replace all occurrences of
"#(\d+)" to be replaced by:

'<a href =
https://rook.chessclub.com/bugzilla/show_bug.cgi?id=$1">$1</a>'

where $1 is the matching bug number. So "#555" will
make a link to my Bugzilla bug 555.

Alternatively, instead of a script, a way to add
regular expression substitutions would be great.
Perhaps a multi-line text attribute of a Backtalk Book,
where each line contains a regular expression and a
parameterized substitution string.

Does such a capability already exist? Is anyone
working on it?

- Ken Seehart

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.