Writing in Markdown — Hiding Notes

This is the first in a series of short posts on writing with Markdown1. I don't know how many, what the topics are or how often I will post them. These will be boring to many, obvious to some and useful to few. Sounds exciting, right?

If you need some introduction to Markdown and why it's great, I recommend Brett's two minute explanation and MacSparky's introduction to plain text.

Notes and Outlining

When I write a long post for Macdrifter2 I typically write an outline first. Previously, I would paste the list into my Markdown document so that I could refer back to it as I wrote. The downside to that approach was that when I'd view the article with Marked, I'd have to look at the ugly outline along with the nicely formatted text. It was not satisfying.

Here's what it looked like in Marked while I would write

After reading Glenn Fleishman's Take Control of BBEdit book, I realized I was doing it all wrong. By wrapping my notes in the HTML escape block, I could have my notes visible during the writing phase but exclude them from Markdown processing.

That's for my CarbonFin post from a few days back. All of the bit in the comment block is escaped by the Markdown processor and by any HTML renderer. In fact, if you go look at the source for that post, you will see the list is still in there.

I usually try to remove the list when I am done, but sometimes it makes it through.

Also note, that I use three dashes at the beginning and end of the comment block. It makes it easier to do a grep search in BBEdit to find all of my little unintentional easter eggs.

  1. Technically I write in MultiMarkdown which is an improvement on Markdown provided graciously by the phenomenon known as Fletcher Penney. I tend to call it Markdown. I am wrong. 

  2. Which is virtually every post I make. What can I say, I like to ramble.