Re: attribute blocks for definition lists
On Mon, Jul 1, 2013 at 11:33 AM, Matthieu Codron wrote: > > the syntax would be > > term {#id} > : definition > Python-Markdown already has extensions for Attribute Lists [1] and Definition Lists [2] (both also available as part of Extra [3]). However, due to the restriction that definition list terms can only be on a single line (each line is a separate term), it was impossible to assign attrs to the term. I was already special casing headers (h1-6) for the same reason, so it wasn't too hard to adapt the code to work with dt's also. I just pushed a fix [4] which implements support for this syntax (you can set any kind of attribute supported by the attr_list extension) and it should be available in the next release of Python-Markdown (probably 2.3.2). As always, testing/feedback is welcome. [1]: http://pythonhosted.org/Markdown/extensions/attr_list.html [2]: http://pythonhosted.org/Markdown/extensions/definition_lists.html [3]:http://pythonhosted.org/Markdown/extensions/extra.html [4]:https://github.com/waylan/Python-Markdown/commit/a9ca97325e9039de90eae29fb3d8879bc9f367f6 \X/ /-\ `/ |_ /-\ |\| Waylan Limberg ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss
Re: attribute blocks for definition lists
Right now, I don't think I would implement this particular syntax. F- -- Fletcher T. Penney fletc...@fletcherpenney.net On Jul 11, 2013, at 6:33 AM, Matthieu Codron wrote: > From: "Fletcher T. Penney" > > I'm not sure I want to head down that path yet for MultiMarkdown. I'm not > ruling it out for all time, but I worry about the "cruft" vs "reward" balance. > > I understand your point of view. But I'd like to avoid future implementation > divergences ; so I'd like to hear you about the propoosed syntax : if you > were about to implement it in MultiMarkdown, would you adopt this syntax ? I > know you cannot give a definitive answer, but at least can you confirm it > seems good to you ? > > Thanks > > Matthieu > ___ > Markdown-Discuss mailing list > Markdown-Discuss@six.pairlist.net > http://six.pairlist.net/mailman/listinfo/markdown-discuss smime.p7s Description: S/MIME cryptographic signature ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss
Re: attribute blocks for definition lists
> > From: "Fletcher T. Penney" > > I'm not sure I want to head down that path yet for MultiMarkdown. I'm not > ruling it out for all time, but I worry about the "cruft" vs "reward" > balance. > > I understand your point of view. But I'd like to avoid future implementation divergences ; so I'd like to hear you about the propoosed syntax : if you were about to implement it in MultiMarkdown, would you adopt this syntax ? I know you cannot give a definitive answer, but at least can you confirm it seems good to you ? Thanks Matthieu ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss
Re: attribute blocks for definition lists
I'm not sure I want to head down that path yet for MultiMarkdown. I'm not ruling it out for all time, but I worry about the "cruft" vs "reward" balance. F- -- Fletcher T. Penney fletc...@fletcherpenney.net On Jul 6, 2013, at 2:24 PM, Matthieu Codron wrote: > > > > On Wed, Jul 3, 2013 at 6:00 PM, Michel Fortin wrote: > Le 1-juil.-2013 ? 11:33, Matthieu Codron a ?crit > : > > > Hello, > > > > As I am using markdown to write documentation, I am often tempted to make > > links to terms in definition lists. > > > > Since this is not possible for now (at least in php markdown extra), I was > > wondering if this could be a common addition in major implementation > > supporting definition lists. > > > > the syntax would be > > > >term {#id} > >: definition > > > > This syntax tries to follows current convention and use the similarity > > between titles and terms. > > I'm planning to add this to the next version of PHP Markdown Extra. > > I'd love to see this in PHP Markdown Extra, but also in pandoc and > MultiMarkdown... John, Fletcher, what do you think about it ? > ___ > Markdown-Discuss mailing list > Markdown-Discuss@six.pairlist.net > http://six.pairlist.net/mailman/listinfo/markdown-discuss smime.p7s Description: S/MIME cryptographic signature ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss
Re: attribute blocks for definition lists
On Wed, Jul 3, 2013 at 6:00 PM, Michel Fortin wrote: > Le 1-juil.-2013 ? 11:33, Matthieu Codron a > ?crit : > > > Hello, > > > > As I am using markdown to write documentation, I am often tempted to make > > links to terms in definition lists. > > > > Since this is not possible for now (at least in php markdown extra), I > was > > wondering if this could be a common addition in major implementation > > supporting definition lists. > > > > the syntax would be > > > >term {#id} > >: definition > > > > This syntax tries to follows current convention and use the similarity > > between titles and terms. > > I'm planning to add this to the next version of PHP Markdown Extra. > I'd love to see this in PHP Markdown Extra, but also in pandoc and MultiMarkdown... John, Fletcher, what do you think about it ? ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss
Re: attribute blocks for definition lists
Le 1-juil.-2013 à 11:33, Matthieu Codron a écrit : > Hello, > > As I am using markdown to write documentation, I am often tempted to make > links to terms in definition lists. > > Since this is not possible for now (at least in php markdown extra), I was > wondering if this could be a common addition in major implementation > supporting definition lists. > > the syntax would be > >term {#id} >: definition > > This syntax tries to follows current convention and use the similarity > between titles and terms. I'm planning to add this to the next version of PHP Markdown Extra. -- Michel Fortin michel.for...@michelf.ca http://michelf.ca ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss
Re: attribute blocks for definition lists
On Mon, Jul 1, 2013 at 8:51 AM, Andy Lee wrote: > Out of curiosity, do I understand correctly that > > term > : definition > > is already in common usage when people write plain text? I was not aware of > that, so if so, I may start adopting it in my own emails etc. I do it regularly, but I generally compose in Markdown without thinking about it and I use definition lists with this syntax quite a bit in other systems where it's standard, so it just comes naturally! c -- Chris Lott ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss
Re: attribute blocks for definition lists
On 2013-07-02 06:20 +0200 sendi...@gmx.net wrote: > I would even go further and (gradually) allow setting {#id .class > attr="attr"} for *any* element. > > For block elements it would be in the last or following line and for > span elements it would directly follow: e.g. *imporant > text*{.special_emphasis}. This is already allowed by kramdown, see http://kramdown.rubyforge.org/syntax.html#inline-attribute-lists Best regards, Thomas ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss
Re: attribute blocks for definition lists
I would even go further and (gradually) allow setting {#id .class attr="attr"} for *any* element. For block elements it would be in the last or following line and for span elements it would directly follow: e.g. *imporant text*{.special_emphasis}. Am 01.07.2013 um 17:52 schrieb David Chambers : > This strikes me as a sound suggestion. It would allow us to use a definition > list where currently we'd be forced to use headings and paragraphs. > > > On 1 July 2013 08:33, Matthieu Codron wrote: > Hello, > > As I am using markdown to write documentation, I am often tempted to make > links to terms in definition lists. > > Since this is not possible for now (at least in php markdown extra), I was > wondering if this could be a common addition in major implementation > supporting definition lists. > > the syntax would be > > term {#id} > : definition > > This syntax tries to follows current convention and use the similarity > between titles and terms. > > Matthieu > > ___ > Markdown-Discuss mailing list > Markdown-Discuss@six.pairlist.net > http://six.pairlist.net/mailman/listinfo/markdown-discuss > > > ___ > Markdown-Discuss mailing list > Markdown-Discuss@six.pairlist.net > http://six.pairlist.net/mailman/listinfo/markdown-discuss ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss
Re: attribute blocks for definition lists
Aristotle Pagaltzis writes: > * Andy Lee [2013-07-01 18:55]: >> Out of curiosity, do I understand correctly that >> >> term >> : definition >> >> is already in common usage when people write plain text? I was not >> aware of that, so if so, I may start adopting it in my own emails etc. > > I’ve never seen it in email. I have seen in pandoc and some blogposts the following sintax: Term: ~ Definition (two spaces before ~) pgpPY8u2xVsri.pgp Description: PGP signature ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss
Re: attribute blocks for definition lists
On Jul 1, 2013, at 8:33 AM, Matthieu Codron wrote: > As I am using markdown to write documentation, I am often tempted to make > links to terms in definition lists. > > Since this is not possible for now (at least in php markdown extra), […] It is. You just have to write your anchors manually. ~ Term : Definition ~ On Jul 1, 2013, at 9:51 AM, Andy Lee wrote: > Out of curiosity, do I understand correctly that > > term > : definition > > is already in common usage when people write plain text? I was not aware of > that, so if so, I may start adopting it in my own emails etc. I have only ever seen it in Markdown source. It’s much more natural to use a trailing colon after the term. Alan ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss
Re: attribute blocks for definition lists
* Andy Lee [2013-07-01 18:55]: > Out of curiosity, do I understand correctly that > > term > : definition > > is already in common usage when people write plain text? I was not > aware of that, so if so, I may start adopting it in my own emails etc. I’ve never seen it in email. ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss
Re: attribute blocks for definition lists
I don't know about the {#id} part, but MultiMarkdown recognizes that syntax for definition lists. Out of curiosity, do I understand correctly that term : definition is already in common usage when people write plain text? I was not aware of that, so if so, I may start adopting it in my own emails etc. --Andy On Jul 1, 2013, at 11:33 AM, Matthieu Codron wrote: > Hello, > > As I am using markdown to write documentation, I am often tempted to make > links to terms in definition lists. > > Since this is not possible for now (at least in php markdown extra), I was > wondering if this could be a common addition in major implementation > supporting definition lists. > > the syntax would be > > term {#id} > : definition > > This syntax tries to follows current convention and use the similarity > between titles and terms. > > Matthieu ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss
Re: attribute blocks for definition lists
This strikes me as a sound suggestion. It would allow us to use a definition list where currently we'd be forced to use headings and paragraphs. On 1 July 2013 08:33, Matthieu Codron wrote: > Hello, > > As I am using markdown to write documentation, I am often tempted to make > links to terms in definition lists. > > Since this is not possible for now (at least in php markdown extra), I was > wondering if this could be a common addition in major implementation > supporting definition lists. > > the syntax would be > > term {#id} > : definition > > This syntax tries to follows current convention and use the similarity > between titles and terms. > > Matthieu > > ___ > Markdown-Discuss mailing list > Markdown-Discuss@six.pairlist.net > http://six.pairlist.net/mailman/listinfo/markdown-discuss > > ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss
attribute blocks for definition lists
Hello, As I am using markdown to write documentation, I am often tempted to make links to terms in definition lists. Since this is not possible for now (at least in php markdown extra), I was wondering if this could be a common addition in major implementation supporting definition lists. the syntax would be term {#id} : definition This syntax tries to follows current convention and use the similarity between titles and terms. Matthieu ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss