Strikethrough syntax
nav_first.pngFirst: thread:131
HTML Block
Edited: 11 Oct 2012 12:06 by: James Kanjo
Comments: 0
Tags:
nav_prev.pngPrevious: thread:132
Site Branding
Edited: 19 Dec 2010 23:36 by: leiger
Comments: 0
Tags:
Last: thread:112
Image Module
Edited: 12 Nov 2009 12:22 by: pieterh
Comments: 0
Tags:
nav_last.png
Next: thread:371
Improved User Experience for new Wikidot users
Edited: 12 Oct 2010 22:24 by: leiger
Comments: 0
Tags:
nav_next.png

pieterhpieterh wrote on 18 Feb 2010 12:14

New strikethrough syntax

This is a design sketch for a new strikethrough syntax that fixes an old design error in the syntax, where double hyphen is used both for strikethrough and for em-dash.

  1. We add a new strikethrough command '==' that works like the current strikethrough but does not conflict with em-dashes.
  2. We change the way the old strikethrough works to make it safe with em-dashes and yet remain backwards compatible with most existing strikethrough.
  3. We deprecate the old strikethrough and discourage its use.

To make the old strikethrough safe, we restrict it to a specific case:
This is a design sketch for a new strikethrough syntax that fixes an old design error in the syntax, where double hyphen is used both for strikethrough and for em-dash.

  1. We add a new strikethrough command '==' that works like the current strikethrough but does not conflict with em-dashes.
  2. We change the way the old strikethrough works to make it safe with em-dashes and yet remain backwards compatible with most existing strikethrough.
  3. We deprecate the old strikethrough and discourage its use.

To make the old strikethrough safe, we restrict it to a specific case:

  • The opening -- must have a space, start of the line, or other non-word character before it, and must be immediately followed by a word character.
  • The closing -- must have a space, end of the line, or other non-word character after it, and must immediately follow a word character.

Examples:

This syntax Produces this text
This--is a--string This—is a—string
This--is a string-- This—is a string—
This -- is a -- string This — is a — string
This --is a-- string This is a string
This --is a string-- This is a string

Thus existing strikethrough of whole words (the most common case) will still work, while em-dashes that use either the space or no-space style will display correctly.


Start a new sub-thread

This will generate another "error" By michal-frackowiak 1 Comments 09 Mar 2010 13:01
I don't like en-dash By Brunhilda 6 Comments 18 Feb 2010 22:42

We discourage direct comments on this thread: to discuss it, please start a sub-thread.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License