rickysarraf / foxreplace

Automatically exported from code.google.com/p/foxreplace
0 stars 0 forks source link

Somethings are replaced, some are not #156

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I keep a list named "bad sites" and another one named "good sites"

I use those to filter google results that I already dealt with.

The bad sites list so far has two lines, one of them is of the type 
nameofthesite.blablabla. The keyword (Text) to replace is "nameofthesite"
THIS ONE WORKS

the other one is nameofthesite.something.blablabla. The keyword (also Text) is 
"nameofthesite.something"
THIS ONE DOES NOT WORK

I thought that maybe because of the dot between the words, fox replace wouldn't 
understand, but then comes the good sites list, which has one of the same type 
as the one that worked, but in this case it doesn't.

Why ?
The option Replace automatically on the page load is marked. Nothing else.
Obviously, the lists have Enabled marked.

I've tried to scramble the lists, joining them, making a single list, etc, 
changing the words to replace by, marking and unmarking the case sensitivity, 
enabling/disabling output and input of html replacement.
What am I missing ?

Just now I've done another test.
Invented a keyword to replace, like "something.otherthing" to replace with 
"TestWord"

On a google result, some of the occurrences are replaced, some, two lines 
below, are not.
I cannot see a pattern here.

Original issue reported on code.google.com by lucasd...@gmail.com on 11 Dec 2014 at 6:18

GoogleCodeExporter commented 9 years ago
Hi, I need a specific example that doesn't work to test it myself, and the 
steps to reproduce it.

Original comment by marc.r...@gmail.com on 11 Dec 2014 at 9:14

GoogleCodeExporter commented 9 years ago
I was going to prepare the steps, and somehow it is now working

I guess it was just a matter of restarting the computer.

This tread may be deleted...

Thank you for your time, Marc

Great software, guys

Original comment by lucasd...@gmail.com on 11 Dec 2014 at 4:20

GoogleCodeExporter commented 9 years ago

Original comment by marc.r...@gmail.com on 11 Dec 2014 at 6:56

GoogleCodeExporter commented 9 years ago

Original comment by lucasd...@gmail.com on 18 Feb 2015 at 12:04

Attachments:

GoogleCodeExporter commented 9 years ago
Ok, I see. The problem here is that in the bad cases the text is not a simple 
string. For example, with opensubtitles, when it works it's because it's really 
"opensubtitles" in the source, but when it fails just below, there is a bold 
part and in the source it may be "opensubtitles", which means that the text is 
split into different nodes in the DOM tree. FoxReplace applies the 
substitutions for each node, so if the text is split between nodes it can't 
replace it. Maybe I will be able to improve this in the future, but I can't 
promise anything.

Original comment by marc.r...@gmail.com on 18 Feb 2015 at 9:26