| Message |
Quote:
When does the "find and replace" get triggered off? And what of ANSI codes? MXP codes? MXP entities?
Well, it would get triggered off the newline, since you don't really need to match it as it comes, only when it's done, and about colour codes, it's a compromise, as it's better than nothing, for example:
Say I want to replace "blue bear" with "red horse"
<green>You see a <blue>blue<green> bear.
The output would be
<green>You see a <blue>red horse.
Ideally, we would be able to add raw ANSI codes to the string to be replaced, but still, not many lines I want to replace have more than one color.
About the color thing, think you could change it to match on raw colors? Like, add an option, which for example would have triggers of this style:
<green>*gets damaged! <blue>It scraps!
Essentially triggers would not omit the colour codes, but would instead keep them as normal text we could match on, so we could do:
\1B[31m*some red text.
Would match on "\1B[31mSome red text".
Wouldn't that be as easy to implement as just keeping the colour codes in the line and adding an option? It would allow us to match colors that change mid-line, although, as I said, those are not very frequent. |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | top |
|