Re: No Markdown in s or s ?
On Thu, Apr 23, 2009 at 22:23, david parsons wrote: > In article <534004cc0904231401m3ae87c98r3ed863192b678...@mail.gmail.com>, > Sherwood Botsford wrote: > >>I'm sure there are situations where you DONT want markdown to process >>what is inside block tags > > In my case, the situations are pretty near all of them. I've tossed > some extensions into discount so I can wedge and into > the text without actually having to write them, so the only reason I > use vanilla html is when I'm adding snippets of html from external > sources That's a very good point. I wrote up a summary of the whole discussion at http://github.com/marcusramberg/mojomojo/issues#issue/16 IMO the best solution, as John Gruber suggested, is to implement specific support for Markdown interpretation in HTML block-level elements: Dan ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss
Re: No Markdown in s or s ?
In article <534004cc0904231401m3ae87c98r3ed863192b678...@mail.gmail.com>, Sherwood Botsford wrote: >I'm sure there are situations where you DONT want markdown to process >what is inside block tags In my case, the situations are pretty near all of them. I've tossed some extensions into discount so I can wedge and into the text without actually having to write them, so the only reason I use vanilla html is when I'm adding snippets of html from external sources (like bikely route html, statcounter poop, or railroa timetables) where I do not want to have them marked up. Doing something like >%class:pic% > [... all of the picture goop ...] (or however the other markdown implementations do their style hacks) has the decided advantage that even though it does require that you know about the styles you don't have to go back to html block matching; markdown already has a "you're in this block until you fall off the end" way of doing things, and (at least as far as I'm concerned) it's a better bet to try and follow that than to twine html more intimately than it already is. -david parsons ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss
Re: No Markdown in s or s ?
On Thu, Apr 23, 2009 at 14:01, Sherwood Botsford wrote: > Here's an example of why I set the flag off This flag was...? I gather the entire post was good advocacy for setting markdown_in_html_blocks => 1 > I'm sure there are situations where you DONT want markdown to process > what is inside block tags -- mostly stuff talking about markdown, near > as I can figure, That should go in a , and indeed blocks should be holy and untouched, for they can contain random stuff from whatever programming language that would confuse Markdown. > but I bet the number of people who actually need > "ignore contents of block tags" are a small minority. Completely agree with that. s don't mean anything. Why should they mean something to Markdown? > Now if I could just figure out how to keep markdown from wrapping > block tags in 's GitHub encountered the same problem and came up with http://github.github.com/github-flavored-markdown/ Dan ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss
Re: No Markdown in s or s ?
Here's an example of why I set the flag off For my blog ### 5 April ## Greenhouse hot Last night I plugged in the electric heater for the greenhouse, and started doing the cleanup. Today everything that has true leaves on it moves out of the dining room and into the green house. I've got 6 weeks to get these plants ready for the first farmer's market. Not sure if I'm going to make it. ![My front yard -- Pines in winter](/Images/whatsnew-2009/Pines-in-winter-2009-04-05_13-56-13.jpeg) Maybe I'm jumping the gun just a bit. This part of the yard doesn't look much like spring. *** So in general I have Main flow of text Picture reference Caption text ruler line more main flow class=pic floats left, and is 40% of the width of the parent. class=picr floats right, and is 40% of the width of the parent. This gives me a layout that works on pretty much everything from an iPhone to a 21" display. Now, postulate that I wanted to completely divorce the layout from the content: How would I do it? Blog day: include start_page. include main_flow_1 include pic1 include main_flow_2 include pic2 include main_flow_3 include end_page Yikes. Every photo I want to include will usually require an additional two files. Markdown was intended to reduce the amount of time we spent chasing tags, and to be easy to write, edit and read in plain form as well as published form. But layout is messier than email, and as soon as you get to *anything* that you don't want to run in a fixed width column, it starts getting creaky. I'm sure there are situations where you DONT want markdown to process what is inside block tags -- mostly stuff talking about markdown, near as I can figure, but I bet the number of people who actually need "ignore contents of block tags" are a small minority. Now if I could just figure out how to keep markdown from wrapping block tags in 's ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss
Re: No Markdown in s or s ?
In article <3561cc6d0904231309q585644aj4e3ae5321b244...@mail.gmail.com>, Dan Dascalescu wrote: >From a utilitarian standpoint, does it benefit anyone that Markdown >doesn't parse markup inside divs? It makes the syntax a little bit clearer not to have that special case, and it may stop some screamingly horrible parser edgecases. Quite a few markdown implementations have extensions to do markupable divisions.None of them are very pretty, and that might be enough to keep them out of The Standard(tm). >%class:name% >I do them as quoted blocks with a magic header. It works, >but it's not going to win any awards for clarity. -david parsons ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss
Re: No Markdown in s or s ?
> Go re-read the first three paragraphs of the docs on inline html [1]. > Processing markdown within divs just doesn't fit in with the purpose > of markdown as stated there (i.e.: writing format v. publishing > format). The fact is, a div, although meaningless in itself, is for > publishing purposes. Indeed, just like CSS is for presentation and even progressive MultiMarkdown only allows a small subset of it: [image]: http://path.to/image "Image title" width=40px height=400px style="border 1px black solid"; But I must ask: >From a utilitarian standpoint, does it benefit anyone that Markdown doesn't parse markup inside divs? Dan ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss
Re: No Markdown in s or s ?
On Thu, Apr 23, 2009 at 3:15 PM, Dan Dascalescu wrote: > What surprises me is the rationale of disabling Markdown processing in > s. Go re-read the first three paragraphs of the docs on inline html [1]. Processing markdown within divs just doesn't fit in with the purpose of markdown as stated there (i.e.: writing format v. publishing format). The fact is, a div, although meaningless in itself, is for publishing purposes. Therefore, if you really want it, markdown allows it - but your on you own. In other words, you have to write all the html inside it as well. Makes sense to me. [1]: http://daringfireball.net/projects/markdown/syntax#html -- \X/ /-\ `/ |_ /-\ |\| Waylan Limberg ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss
Re: No Markdown in s or s ?
On Thu, Apr 23, 2009 at 06:07, Sherwood Botsford wrote: > There is also a flag inside multimarkdown that can be set to work > inside what it considers block level tags. I ended up setting this, > and forgetting it. The reason I initially asked this was because I've seen MojoMojo-powered sites doing Markdown in divs just fine (e.g. http://formfu.org). It turns out that indeed MojoMojo uses Multimarkdown with the markdown_in_html_blocks flag set to true[^mm]. What surprises me is the rationale of disabling Markdown processing in s. [^mm]: http://github.com/marcusramberg/mojomojo/blob/477908cf0de52a8a4dcf58887363a70f315731f9/lib/MojoMojo/Formatter/Markdown.pm Dan ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss
Re: No Markdown in s or s ?
Multimarkdown has a pretty good syntax for tables. In general it has the following bug which may be a feature: is considered a tag but is not. The latter is rendered as which breaks the xhtml spec but which is rendered properly on every browser I've checked. There is also a flag inside multimarkdown that can be set to work inside what it considers block level tags. I ended up setting this, and forgetting it. I've been making the argument that div, html, and body (others?) are NOT block tags, but structural tags, and should be ignored. I took a look at the code to see if I could hack it to do this. Markdown has some heavy regexes. Not trivial. On Thu, Apr 23, 2009 at 5:15 AM, Dan Dascalescu wrote: > From http://daringfireball.net/projects/markdown/syntax#html: > >> Note that Markdown formatting syntax is not processed within block-level >> HTML tags. E.g., you can’t use Markdown-style *emphasis* inside an >> HTML block. [...] Unlike block-level HTML tags, Markdown syntax is >> processed within span-level tags. > > How do people work around this when they want to apply Markdown to > text in table elements, or to text in divs? For example, in a basic > page with a grid layout, one would want to use markdown in the > navigation as well, say for a list of links. Seems like a pretty > serious limitation. > > Thanks, > Dan > ___ > Markdown-Discuss mailing list > Markdown-Discuss@six.pairlist.net > http://six.pairlist.net/mailman/listinfo/markdown-discuss > -- Sherwood Botsford Sherwood's Forests Warburg, Alberta T0C 2T0 http://www.sherwoods-forests.com 780-848-2548 ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss
Re: No Markdown in s or s ?
On Thursday 23 April 2009, Dan Dascalescu wrote: > From http://daringfireball.net/projects/markdown/syntax#html: > > Note that Markdown formatting syntax is not processed within block-level > > HTML tags. E.g., you can’t use Markdown-style *emphasis* inside an > > HTML block. [...] Unlike block-level HTML tags, Markdown syntax is > > processed within span-level tags. > > How do people work around this when they want to apply Markdown to > text in table elements, or to text in divs? For example, in a basic > page with a grid layout, one would want to use markdown in the > navigation as well, say for a list of links. Seems like a pretty > serious limitation. There are extensions to the blank Markdown specification, for example PHP Markdown Extra supports something like the following: Here comes more markdown! * list * foobar -- Milian Wolff m...@milianw.de http://milianw.de signature.asc Description: This is a digitally signed message part. ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss
No Markdown in s or s ?
From http://daringfireball.net/projects/markdown/syntax#html: > Note that Markdown formatting syntax is not processed within block-level > HTML tags. E.g., you can’t use Markdown-style *emphasis* inside an > HTML block. [...] Unlike block-level HTML tags, Markdown syntax is > processed within span-level tags. How do people work around this when they want to apply Markdown to text in table elements, or to text in divs? For example, in a basic page with a grid layout, one would want to use markdown in the navigation as well, say for a list of links. Seems like a pretty serious limitation. Thanks, Dan ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss
Re: Table of contents
Sherwood Botsford wrote: > I *don't* think that markdown is the place for this however. > I think this is better approached by your page generating software. MojoMojo uses MultiMarkdown, and I wrote a TOC plugin for it. It uses HTML::Toc to generate the tableof contents from the HTML that MMD spits out. The syntax is: {{toc M- }} # start from Header level M {{toc -N }} # stop at Header level N {{toc M-N }}# process only header levels M..N where M is the minimum heading level to include in the TOC, and N is the maximum level (depth). For example, suppose you only have one H1 on the page so it doesn't make sense to add it to the TOC; also, assume you and don't want to include any headers smaller than H3. The {{toc}} markup to achieve that would be: {{toc 2-3}} Dan ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss