Tuesday, April 3, 2012

Code & quote blocks

Following up from the last update that added smart bulleted & numbered lists, the WikiPack web based Markdown editor now also has smart quote & code blocks:

~~~

Smart, transparent technology

In keeping with the philosophy of making technology smart, but transparent, it does some things that you’d expect to happen instinctively, but may not be aware of while you’re using it. Especially the way it handles quote blocks.

The Markdown spec for code blocks ignores line breaks, but allows you to assert line breaks by adding a double space to the end of each line. If you’re typing into a text editor however and you hit enter, of course you expect it to be honoured as a line break, so WikiPack is smart enough to insert the double spaces for you automatically.

It also allows for nested quotes, but the implementation is a little quirky. If you simply attempt to nest a line by adding a “>” symbol, it will treat that symbol as part of the quote and render it as-is. To begin a new nested level, you need a blank quoted line above it, so when you hit the tab key in WikiPack it creates it for you.

Un-indenting is a little counter-intuitive though. Unfortunately, I couldn’t implement the ubiquitous SHIFT+TAB to un-indent the current line, but instead if you hit the Enter/Return key multiple lines it will un-indent the new line until it reaches the margin, at which point a subsequent press will remove the quote symbol and quit out of quote mode.

With this update, WikiPack now has a full-featured web based GUI Markdown editor, with syntax highlighting. It occurred to me that it might be handy to add controls for adjusting the text size, but that requires inserting HTML tags into the Markup, which is extremely naughty. One thing that it doesn’t provide smart tools for yet is tables, but forget I even mentioned it… :)

Check it out at http://WikiPackIt.com

No comments:

Post a Comment