SO-Close-Vote-Reviewers / UserScripts

Various user scripts that add features to the review queue or to the chat room
Other
57 stars 41 forks source link

Add support to fix dashes with Magic™Editor #141

Closed BaumMitAugen closed 5 years ago

BaumMitAugen commented 5 years ago

Could the script replace -- and --- in non-code areas with – and — respectively?

BasicNullification commented 5 years ago

Does - - - (added spaces since iPhone autocorrects to —) do the equivalent of <del> in posts like they do on the chat servers?

BaumMitAugen commented 5 years ago

No, it does not.

On Dienstag, 27. November 2018 19:59:46 CET K-Davis1 wrote:

Does - - - (added spaces since iPhone autocorrects to —) do the equivalent of <del> in posts like they do on the chat servers?

makyen commented 5 years ago

There are a couple of Markdown conflicts that would need to be watched out for.

h2 headers

and horizontal rules


However, those both require that the /--+/ be the first characters on the line other than whitespace, which could be avoided.

Do you have some examples of where this would be helpful? I don't recall ever seeing a post where this would be something I'd want done. OTOH, those are two characters that live in my permanent clipboard, so using them isn't something I'd take much notice of. I think that I've encountered occasions where this would be detrimental (mostly in things that probably should be code). However, my memory of those possible times is vague.

BaumMitAugen commented 5 years ago

It's just something I come across somewhat regularly, e.g.

https://stackoverflow.com/posts/12476379/revisions https://stackoverflow.com/posts/2659554/revisions https://stackoverflow.com/posts/6943983/revisions

Not a huge deal though, so if it would be causing a headache, we can leave it as is.

makyen commented 5 years ago

The first example you gave shows changing -- to &mdash;. From your first comment here, I was under the impression that you wanted -- to be changed to &ndash;. What should MagicEditor be doing?

makyen commented 5 years ago

I actually am unsure if it will cause problems for others, but I've coded it up, so can have it in the next version. That doesn't mean we won't get people complaining about it. We'll have to see if the changes end up inappropriately applied, and if so, under what conditions.

BaumMitAugen commented 5 years ago

The first example you gave shows changing -- to &mdash;. From your first comment here, I was under the impression that you wanted -- to be changed to &ndash;. What should MagicEditor be doing?

In the first example, I used &mdash; because there was no space around the dash; and from what I've seen, I've thought either word&mdash;word or word &ndash; word are the predominant styles in use.

I might be wrong about that though; and I would not pick a fight with someone who prefers word&ndash;word either. So to be explicit, it appears to me that mapping to &mdash; vs &ndash; vs. <space>&ndash;<space> in that case would be a matter of opinion; if you have a preference or are aware of accepted style guides calling for one or the other, I'd be happy with either choice.

Anyway, thank you for your time and your reply!

makyen commented 5 years ago

My experience with &ndash; and &mdash is primarily on Wikipedia. I really haven't participated much on Wikipedia for a couple of years, but what I recall was that their guidelines were that it was always to be one of word&mdash;word or word &ndash; word. Examples: word—word or word – word In other words, an &ndash; was always to be used if there were spaces separating it from the words, whereas an &mdash; was always to be used if there were no spaces.

BaumMitAugen commented 5 years ago

Yes, this would definitely qualify as desirable behavior by my standards; I just was uncertain how aligned those are with the English speaking world.