News for hackers. Stuff that matters.
Re:The thing I hate about HTML by alextgordon on Thursday July 15, 2010 @10:14AM (#1517851)
Couple of problems with the suggested syntax:

* You can't write lowercase letters without the possibility of it being mistaken for a tag. If I write (hello) and then a <hello> tag is introduced, I'm screwed.

* Parentheses are common in written English. It would be better to use [] {} or <>.

What you could do is substitute () for [] and use a : to introduce character data:

    [font color="red"
      [center:
        hello, world!
      ]
    ]
But people would be forgetting that all the time. Another option is significant newlines. That is, if a trimmed line doesn't start with a "[", it is interpreted as character data:

    [font color="red"
      [center
        hello, world
      ]
    ]
Combined with the : to introduce character data, this is actually kind of good:

    [font color="red"
      [center
        hello, [em:world]!
        [img src="photo.png"]
      ]
    ]
Compared to

    <font color="red">
      <center>
        hello, <em>world</em>!
        <img src="photo.png">
      </center>
    </font>

There are no comments on this comment yet.