From sonjaaa at gmail.com Thu Jul 16 03:37:53 2009 From: sonjaaa at gmail.com (Sonja Elen Kisa) Date: Thu, 16 Jul 2009 03:37:53 -0400 Subject: Table without ? Message-ID: <9a7e9ada0907160037n13541aadjbaf965b63b813f60@mail.gmail.com> Is it possible to have a simple table but without using and the long ----- ? Sonja From ddascalescu at gmail.com Thu Jul 16 05:35:53 2009 From: ddascalescu at gmail.com (Dan Dascalescu) Date: Thu, 16 Jul 2009 02:35:53 -0700 Subject: Table without ? In-Reply-To: <9a7e9ada0907160037n13541aadjbaf965b63b813f60@mail.gmail.com> References: <9a7e9ada0907160037n13541aadjbaf965b63b813f60@mail.gmail.com> Message-ID: <3561cc6d0907160235j77e7c25u96b27aafe29d7435@mail.gmail.com> On Thu, Jul 16, 2009 at 00:37, Sonja Elen Kisa wrote: > Is it possible to have a simple table but without using and the > long ----- ? || a | b | | c | d | If I understood the question correctly, the code above does the trick. I'm using MultiMarkdown, though. You can test that live on my wiki's sandbox, http://wiki.dandascalescu.com/sandbox.edit Hope that helps, Dan From yiyu.jgl at gmail.com Thu Jul 16 14:05:05 2009 From: yiyu.jgl at gmail.com (yy) Date: Thu, 16 Jul 2009 20:05:05 +0200 Subject: md2html.awk and a question Message-ID: Hello, I have just subscribed to this list. I will introduce myself: For some time, I have kept a markdown implementation in awk for personal use, different from other implementations. Now, I'm in the process of rewriting it and I'm trying to do it as compatible as possible. There are many questions I have, I know some test suites and am trying to pass those tests. When I don't know how to handle a corner case I use to check with Dingus. I would really appreciate if somebody could explain me the output of this text: this paragraph is outside of list blocks * #this is not a h1 * ##this is not a h2 * ###and this is not a h3 * but the next one is #an h1! inside a list item, ok, but... * ###wtf is this? bad, bad, bad... - btw, this an h1, not a list item =================== - but indenting... ============ that's better I would also like to know what is the best source for markdown syntax, any suggestion is welcomed. For example, I see some talk about tables (older versions of md2html.awk supported tables, and I hope to add them again). I'm slowly digging in the archives, but a reference would save me some time. Thanks in advance. If you are interested, you can have a look at the development process of md2html.awk and download the last version at http://www.anarchyinthetubes.com/src/md2html.awk/ -- - yiyus || JGL . 4l77.com From seumas at idirect.ca Thu Jul 16 21:09:23 2009 From: seumas at idirect.ca (Seumas Mac Uilleachan) Date: Thu, 16 Jul 2009 21:09:23 -0400 Subject: md2html.awk and a question In-Reply-To: References: Message-ID: <4A5FCF43.4080400@idirect.ca> Hi, if I read your example right, the bullet markup should take priority over anything else in that line. So the #h1 ##h2 ###h3 etc should not be headers since they are part of a bulleted list. Also the # is not the first character of the line. As for the indented #an h1, should that be a header? I would think not myself. If it's indented it's intended to be something else to my thinking. As for the - btw, this an h1, not a list item =================== that is so ambiguous it could be either. I suppose the ==== and ---- headers, since they span multiple lines, probably take priority over everything. Then again, it may depend on your markdown version (perl, php, python, haskell, etc). yy wrote: > Hello, > > I have just subscribed to this list. I will introduce myself: For some > time, I have kept a markdown implementation in awk for personal use, > different from other implementations. Now, I'm in the process of > rewriting it and I'm trying to do it as compatible as possible. > > There are many questions I have, I know some test suites and am trying > to pass those tests. When I don't know how to handle a corner case I > use to check with Dingus. I would really appreciate if somebody could > explain me the output of this text: > > this paragraph is outside of list blocks > > * #this is not a h1 > * ##this is not a h2 > * ###and this is not a h3 > * but the next one is > > #an h1! > inside a list item, ok, but... > > * ###wtf is this? > > bad, bad, bad... > > - btw, this an h1, not a list item > =================== > > - but indenting... > ============ > > that's better > > I would also like to know what is the best source for markdown syntax, > any suggestion is welcomed. For example, I see some talk about tables > (older versions of md2html.awk supported tables, and I hope to add > them again). I'm slowly digging in the archives, but a reference would > save me some time. Thanks in advance. > > If you are interested, you can have a look at the development process > of md2html.awk and download the last version at > http://www.anarchyinthetubes.com/src/md2html.awk/ > > > From yiyu.jgl at gmail.com Fri Jul 17 03:43:27 2009 From: yiyu.jgl at gmail.com (yy) Date: Fri, 17 Jul 2009 09:43:27 +0200 Subject: md2html.awk and a question In-Reply-To: <4A5FCF43.4080400@idirect.ca> References: <4A5FCF43.4080400@idirect.ca> Message-ID: 2009/7/17 Seumas Mac Uilleachan : > Hi, if I read your example right, the bullet markup should take priority > over anything else in that line. So the #h1 ##h2 ###h3 etc should not be > headers since they are part of a bulleted list. Also the # is not the first > character of the line. > Dingus does not consider it a header if it is at the begining of the list, but it does it if it is not the first paragraph. However, for some reason, it considers the line "* ###wtf is this?" a header. > As for the indented #an h1, should that be a header? I would think not > myself. If it's indented it's intended to be something else to my thinking. > I like to think that quote blocks and list items can contain everything as long as it is preceeded by the right indentation. > As for the > > - btw, this an h1, not a list item > =================== > > that is so ambiguous it could be either. I suppose the ==== and ---- > headers, since they span multiple lines, probably take priority over > everything. In Dingus, the indentation of the equal signs line makes a difference. I think this is the right behaviour, but I don't see how it could be applied to setex-style headers. > Then again, it may depend on your markdown version (perl, php, python, > haskell, etc). > I know it depends on the version. I am writing my own implementation in awk and would like to be as compatible as possible with existing documents. I think what I will do is to not look for headers at the beginning of list items, since some files I have found contain lists with irc channels (so, starting with #) that were becoming unwanted h1's. It would not be a problem at all to check for different conditions, but they are not evident to me and I'm not sure it is worth the trouble. Thanks for your reply, -- - yiyus || JGL . 4l77.com From michel.fortin at michelf.com Fri Jul 17 22:08:11 2009 From: michel.fortin at michelf.com (Michel Fortin) Date: Fri, 17 Jul 2009 22:08:11 -0400 Subject: md2html.awk and a question In-Reply-To: References: Message-ID: <563F636D-A2EB-45EF-97B5-E32A7E06ABEB@michelf.com> Le 2009-07-16 ? 14:05, yy a ?crit : > There are many questions I have, I know some test suites and am trying > to pass those tests. When I don't know how to handle a corner case I > use to check with Dingus. I would really appreciate if somebody could > explain me the output of this text: > > this paragraph is outside of list blocks > > * #this is not a h1 > * ##this is not a h2 > * ###and this is not a h3 > * but the next one is > > #an h1! > inside a list item, ok, but... > > * ###wtf is this? > > bad, bad, bad... The algorithm in Markdown.pl resumes to this: 1. The content of a list item which contains a blank line is treated as block-level content. 2. The content of a list item preceded by a blank line, when it's not the first item of a list, is teated as block level content. 3. The content of a list item followed by a blank line, when it's not the last item of a list, is teated as block level content. 4. Otherwise, the content is parsed for sublists and the rest is span-level content. > - btw, this an h1, not a list item > =================== > > - but indenting... > ============ > > that's better The algorithm in Markdown.pl resumes to this: 1. Any non-blank line followed by a non-indented line of three or more of consecutive `=` is treated as a h1 header. Inside a h1 header only span-level content is allowed. Oh, and Makrdown.pl searches for headers before checking for lists, so it won't see a list here. I'm not claiming any of this makes any sense. Just how Markdown.pl (and PHP Markdown) works. -- Michel Fortin michel.fortin at michelf.com http://michelf.com/ From orc at pell.chi.il.us Sat Jul 18 23:06:24 2009 From: orc at pell.chi.il.us (david parsons) Date: 19 Jul 2009 03:06:24 GMT Subject: md2html.awk and a question References: Message-ID: In article , yy wrote: >Hello, > >I have just subscribed to this list. I will introduce myself: For some >time, I have kept a markdown implementation in awk for personal use, >different from other implementations. Now, I'm in the process of >rewriting it and I'm trying to do it as compatible as possible. > >There are many questions I have, I know some test suites and am trying >to pass those tests. When I don't know how to handle a corner case I >use to check with Dingus. I would really appreciate if somebody could >explain me the output of this text: > > this paragraph is outside of list blocks > > * #this is not a h1 > * ##this is not a h2 > * ###and this is not a h3 > * but the next one is I think the problem here is that the reference implementation has trouble parsing unusual lists (I can get it to generate improper html by putting '>'s inside of a list: - > hi > - > there ...) and you might be better off just having your implementation do list processing in the way you see best. -david parsons