Turn off smart quotes temporarily?

Hi, I have smart quotes turned on and it works as expected. However, that also gets me smart quotes inside of HTML entities, like so:

<img src=„myimage.png“>

which is of course not what I want. Is there a way to turn off smart quotes temporarily (better yet: just do not be too “smart” inside HTML entities)?

I would use an action or TextExpander snippet for whatever case is less frequent for my use.

1 Like

That’s similar to what I do with <span> - as that now has some useful effects in md2pptx.

In my case it’s a selection menu for colours - in Keyboard Maestro. (To be fair I had to paste straight quotes into the KM editor.)

But here the whole <img> element coding would benefit, not just the quoting.

I am wondering, though, why you aren’t avoiding this hassle by using Markdown [...](...) syntac anyway. The one reason I could see is if you have to go to HTML because of some other syntax, such as width=.

Simple: I’m working on a blog post for wordpress, and I need

<img src="abc.png" class="xxx">
<p caption="yyy">...</p>

there. WP is a beast, and instead of hunting for the theme to meet all my needs, I just decided to use this approach for images. If I knew how to tweak the HTML preview in Drafts enough to convert [...](...) into my format, I’d rather do that – less typing, too :wink:
[Update] Using the normal markdown syntax for images and then converting it to the HTML I want before the preview step actually works… I can even trick the action script into using the correct class for the img element by prefixing the link. Thanks for nudging me in the right direction.

1 Like

You might consider leaving smart quotes off and letting the Markdown parser apply smart quotes. Both parsers support that, and are smart enough not to affect your HTML tags when doing it.

Just to clarify: I just type away with “dumb” quotes and when I convert the MD to HTML via a the HTML preview action, the quotes outside of HTML get converted to smart ones automagically?

Yes, exactly. As long as you have the “Smart Quotes” option enabled in Markdown Settings (which is the default).