mgmeyers / obsidian-smart-typography

Converts quotes to curly quotes, dashes to em dashes, and periods to ellipses
GNU General Public License v3.0
241 stars 11 forks source link

A command to turn of smart quotes temporarily, for CSS #12

Open seatrout opened 2 years ago

seatrout commented 2 years ago

It would be really helpful if there were a command or a setting, to turn off smart quotes temporarily — the reason being that if you use the sidenotes.css hack and type in <span> class="aside-show". (some random text) </span> or even put that on a macro key, it won't work if this plugin is turned on, because the css parser doesn't recognise curly quotes.

I suppose another answer would be to write a tiny plugin that did nothing but wrap selected text in the proper span class with dumbquotes preserved. I could do that for myself, but it's not much use for other people.

mgmeyers commented 2 years ago

@seatrout You can undo the automatic formatting this plugin does by hitting delete/backspace. Does this accomplish what you're after?

https://user-images.githubusercontent.com/2694747/143781125-45804c7d-aa9d-4d20-8dab-3c08043026d5.mov

seatrout commented 2 years ago

Not really, because I had written an autohotkey macro to inert the whole <s class="aside-show"> {text}</s> sequence, and there is no opportunity for the backspace trick when you are inserting text programmatically, like that. But I think I have knocked up a tiny plugin to do what I want. I just haven't tested it properly yet. It's hard to know how many other people might find it useful: the intersection of the sets of people who use smart quotes and little bits of hand-rolled HTML may be very small indeed.