Help to sort checklist and preserve section breaks

I use this action frequently. However, it converts “—” into “—“.

I’ve tried multiple variations in debugging. Sometimes it only happens if boxes are actually moved. (If there are checked boxes). Sometimes it’s not on the first run of the action, but every run thereafter (sometimes then only if there are checked boxes, other times it just happens - but only the second time and every time thereafter but not the first).

I don’t want to change system level smart punctuation setting. Is there a way to create an action that does the same thing but without messing up the 3-hyphen section breaks?

You can just disable “Smart Dashes” in Drafts editor settings, you don’t have to do it system wide. That’s probably what makes the most sense.

The action could also be modified to set the content of the draft itself, and not use the editor methods to set the text, and that would avoid the text being passed through modifications like “smart” dashes.

Thanks for the tip about avoiding editor methods! I didn’t realize using editor.setText() could trigger smart punctuation changes. I’ll try modifying the action to update the draft content directly instead.