View Single Post
Old 07-26-2014, 05:49 AM   #25
ShellShock
Wizard
ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.
 
ShellShock's Avatar
 
Posts: 1,178
Karma: 2431850
Join Date: Sep 2008
Device: IPad Mini 2 Retina
I want to widen the original question if I may: "Is there a way to limit the scope of a search/replace to the actual text that is displayed to the reader?" E.g., we can currently set the scope to "Current file", "All text files" etc. I was thinking of an additional option to set the scope, e.g., "All inner text". I believe this is what smarty pants does (could be wrong).

This option would enable us to roll our own smarty pants using the Saved searches, without worrying about false positive matches on the xml tags. I currently have a regex to match punctuation that is also matching <> in the xml elements. I guess I could try to exclude these from the regex, but it would be safer if the match scope was limited to inner text.
ShellShock is offline   Reply With Quote