New link syntax
John Gruber
gruber at fedora.net
Wed Mar 31 15:05:27 EST 2004
european bob <bob at wolfwall.com> wrote on 03/31/04 at 9:41a:
> This brings me to a slightly separate question: could/should a
> Markdown interpreter generate errors, and how should they be passed
> to the user?
Could? Sure, I guess.
Should? Definitely not.
But that is not to say that a Markdown syntax checker wouldn't be a
valuable tool. (I plan on writing one for BBEdit.)
But it would completely stand apart from the Markdown-to-HTML
translator.
Translation is a part of publishing.
Syntax checking is a part of editing.
It's very important not to blur those lines.
1. Write.
2. Proof.
3. Publish.
A syntax checker belongs in step 2, not step 3.
I'll fully admit that I've occasionally published articles at DF
which have had small transpositions or typos that resulted in
mismatched link references and link definitions. So, typically,
after I publish, I do a quick search for "[".
Things a syntax checker ought to do, off the top of my head:
1. Look for link references that never get defined.
2. Look for redefinitions of existing link IDs. (I.e., two link
defs which define the same ID.)
3. Look for link references that are defined, but never actually
get used.
Think of it like a compiler. A programmer needs to see errors and
warnings before he sends the application off to end users. Why in
the world would end users want to see them?
Or think of a spelling checker in a word processor. It'd be silly to
have spelling errors reported in your printed output. You want to
see them and fix them *before* you print.
-J.G.
More information about the Markdown-discuss
mailing list