Script Mode text formatting questions

So I’ve finally (!!!) gotten around to trying out script mode. Got a question or two regarding how the text formatting updates when you switch between script elements.

I should probably mention first that I never actually tried any of the default script formats and kinda dove right in with creating my own, so it’s entirely likely that I’ve stuffed something up somewhere along the way.

Mac OS: 10.12.6

Okay, so I’ve set up three elements in my script format, Q, A, and C

Q - is italicized black text
A - is just normal black text with no additional formatting.
C - normal grey text.

I’ve set Q and A to switch back and forth on return, that works fine. When at some point I realize that I’ve A’d when I should have Q’d I just put the cursor in that line, hit the keyboard shortcut to switch to Q, and it changes the element and adds the italics.

However, the reverse of that doesn’t work - if something is Q and it should have been A, when I change the element type it does not remove the italics. Is that expected behaviour? I have noticed that if some text is marked as element Q, and I make it Q again, then it removes the italics.

Similarly, changing some text to element C updates the format and makes the text grey. But trying to change text from C to either of the other two, the text colour does not change back to black.

One other issue with the text colour and element C. When I tab or return to switch out of C - if I just start typing all is fine and the text colour changes back to black. However if the first thing on the new line is text inserted by TextExpander, or pasted from the clipboard, the inserted/pasted text remains grey but anything I type after that is black. Unfortunately all my lines start with text being inserted by TextExpander.

^ tested a bit more and that definitely seems to have to do with the clipboard - using Keyboard Maestro to insert text by pasting at the beginning of a line after a C element the text stays grey. Using KM to insert text by typing - the text changes to black as it should.

FWIW, on iOS Scriv using the built-in text replacement I don’t have that issue (IIRC, it’s been a while since I tried it). Unfortunately in Mac Scriv I’ve found that the built-in Mac OS text replacement doesn’t work reliably at the beginning of a new line (only in scriv for some reason, it seems to work fine in TextEdit).