Greasy Fork is available in English.

AO3: highlight tags V2

Configure tags to be highlighted with different colors

< Valutazione su AO3: highlight tags V2

Domanda/commento

§
Pubblicato: 07/03/2022

loving this! was using V1 before and just found this V2. only problem i've run into is that for both versions, if i tag 'harry potter/draco malfoy' or 'relationship!harry potter/draco malfoy' for example, it's also highlighting any tags with 'harry potter' and/or 'draco malfoy'. i'm not sure how to make it stop doing that.

§
Pubblicato: 08/03/2022

That's weird... it definitely doesn't do that for me. I have this line in mine:

"Wu Xie/Zhang Qiling":"#4198e9", // blue

and I don't get the characters highlighted separately from the pairing.

That said, all things are treated as patterns, so you can try starting the pattern with ^ and/or ending it with $ and see if that makes a difference. Then it will only color tags that start/end with that word, so you'll *probably* only get those you want. You could maybe also try escaping the / , i.e. try \/ and see what happens.

For those with tagtype (i.e. "relationship!..."), you have to make any changes after the ! . The part in front of the ! doesn't count towards the pattern, and if you add anything there, it won't work.

I hope this was helpful?

§
Pubblicato: 19/04/2022

That's weird... it definitely doesn't do that for me. I have this line in mine:

"Wu Xie/Zhang Qiling":"#4198e9", // blue

and I don't get the characters highlighted separately from the pairing.

That said, all things are treated as patterns, so you can try starting the pattern with ^ and/or ending it with $ and see if that makes a difference. Then it will only color tags that start/end with that word, so you'll *probably* only get those you want. You could maybe also try escaping the / , i.e. try \/ and see what happens.

For those with tagtype (i.e. "relationship!..."), you have to make any changes after the ! . The part in front of the ! doesn't count towards the pattern, and if you add anything there, it won't work.

I hope this was helpful?

a friend finally worked out what was going on! the character relationships I had in the tags involved characters who had two names (birth name and nickname) and AO3 tagging formats it as 'character name | nackname'. because | has functions in code as 'OR' it was confusing the code we think. they tried a bunch of work arounds and the solution was to use two backslashes in front of the relationship inside the quotes. so we've ended up with "\\^character | nickname/character$" which works!

§
Pubblicato: 21/04/2022

Thank you! That hadn't occurred to me! Of course, the '|' character in a regular expression means "OR". And every pattern you enter in the script is run through a regex. Thank you so much for figuring it out. I experimented a bit and found that it's enough to escape the | with two backslashes: '\\|' . I've updated the examples in the script info accordingly.

Pubblica risposta

Accedi per pubblicare una risposta.