How WordPress handles dashes and hyphens


Mark Jaquith on dashes and hyphens in the editor:

So, three hyphens always gets you an em-dash. Two hyphens gets you an em-dash if spaced apart from surrounding words. Else, you get an en-dash.

I don’t mind the Visual Editor as much as some others seem to. Half of everything I write goes directly into the WordPress Visual Editor. Learning the editor’s behavior, like what Jaquith describes, makes the process quite a bit more pleasant.

3 thoughts on “How WordPress handles dashes and hyphens

  1. This actually isn’t the visual editor… this is done on the fly by filters on the_content and other such hooks. You get this whether or not you use the visual editor.

  2. Speaking of the visual editor, don’t forget that there is a button for custom characters, if you want to go hunting for dashes.

    I wish the dotorg codex had good beginner/end user documentation like this that I could link to instead!

Comments are closed.