[text][index](url) syntax

Jakob jakov at gmx.at
Thu May 31 10:44:41 EDT 2012


I think you have convined me that it is not that a good idea.

However, I think that every decent markdown editor should have a functionality to swap between the two states (I forgot to mention this, although it gave me the initial idea):

When switching from [text][index] to [text](url) the information about the index gets lost. I find it very userul to have indices with names rather than numbers switching back would create the need to generate an index: either the script would take the top level domain and check whether it s already been taken or create a number which hasnt been taken yet.

My idea would have avoided this dilemma, but i guess it s not worth changing the syntax for that.

I do like the idea of using "ibid." or similar to denote same links, but i feel this could result in a big mess if you change parts of the text before! Maybe also this should be accomplished on userside through a script that copies the reference of the last link when typing e.g. "[anotherlink][=]".

Regards,

jakov

Am 31.05.2012 um 15:05 schrieb Sherwood Botsford <sgbotsford at gmail.com>:


> This is one of those specialist apps that needs a post processing script.

>

> Define them as end notes. The script reparses the markdown document and re-inserts them inline as inline HTML A clever

> script would allow you to choose to insert every time or just the first time. A really clever script would allow you to define each reference ONCE in a single file, and use that to resolve multiple references in multiple documents.

>

> This would require re-inventing parts of the MMD parsing tree.

>

> What may be a more general and more valuable mod to MMD would be:

>

> 1. An API that allowed access to the parse tree, after parsing, but before processing into documents.

>

> 2. Hooks that would allow an intermediate external command to run.

>

> I think MMD has #1 as I vaguely recall that MMD uses XLST as an intermediate form, although that may be a daunting API to use.

>

>

> Respectfully,

>

> Sherwood of Sherwood's Forests

>

> Sherwood Botsford

> Sherwood's Forests -- http://Sherwoods-Forests.com

> 780-848-2548

> 50042 Range Rd 31

> Warburg, Alberta T0C 2T0

>

>

>

>

> On 30 May 2012 22:46, David Chambers <david.chambers.05 at gmail.com> wrote:

> What do you think about that? Godd idea? Crap?

>

> Not a good idea, in my opinion. Markdown provides two ways to define links, which are sufficient given that one provides the reusability you desire. As a reader of a Markdown document, I prefer the links to be in one place (generally at the bottom of the document). Inline links are fine, too. The option you present would make it difficult to find the URL for a link via a quick scan of a document.

>

> David

>

>

> On 30 May 2012 14:14, Alan Hogan <contact at alanhogan.com> wrote:

> I haven’t ever seen that used in plaintext writing before, which would make the syntax probably violate the principle of being derived from email list / plain text patterns.

>

> More concerning is that now potentially literal brackets that were adjacent to a link, if anyone had that, would now be linked and more importantly the link text would be hidden. But maybe that’s not so common.

>

> Personally, I don’t see why it’s a big problem to just define the link at the bottom if you want to use it in several places.

>

> But, you did get me thinking. It would be interesting if there was a magic named link, "ibid.", which always refer to the preceding link, in context. So:

>

> [One](http://one.example.com), [two][ibid.], [three][ibid.], [four][], [five][ibid.]

>

> [four]: http://four.example.com

>

> Would generate three links to one.example.com and two to four.example.com.

>

> (If the user had manually defined a link named "ibid." then that would take precedence over the magic implementation. And of course, the first link in the document cannot be an 'ibid.' link; I suppose the behavior should be to either output a link with no href value or just emit the plain text.)

>

> On May 30, 2012, at 1:59 PM, Jakob wrote:

>

> > Hi there! I wanted to drop a line on the markdown syntax used for links:

> >

> > When i reference to [some website][1] and want to do [the same reference][1] later ai can only do this in endnote style (or howeer it's called). What i would want to be able to do is to make [an inline reference to a website][2](http://anotherexample.com) and be able to reuse [that reference][2] just the same.

> >

> > What do you think about that? Godd idea? Crap?

> >

> > Regards,

> >

> > Jakov

> >

> > [1]: http://example.com

> >

> > _______________________________________________

> > Markdown-Discuss mailing list

> > Markdown-Discuss at six.pairlist.net

> > http://six.pairlist.net/mailman/listinfo/markdown-discuss

>

> _______________________________________________

> Markdown-Discuss mailing list

> Markdown-Discuss at six.pairlist.net

> http://six.pairlist.net/mailman/listinfo/markdown-discuss

>

>

> _______________________________________________

> Markdown-Discuss mailing list

> Markdown-Discuss at six.pairlist.net

> http://six.pairlist.net/mailman/listinfo/markdown-discuss

>

>

> _______________________________________________

> Markdown-Discuss mailing list

> Markdown-Discuss at six.pairlist.net

> http://six.pairlist.net/mailman/listinfo/markdown-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://six.pairlist.net/pipermail/markdown-discuss/attachments/20120531/c2402f25/attachment.htm>


More information about the Markdown-Discuss mailing list