Re: [ANN] Babelmark

2008-03-23 Thread Michel Fortin

Le 2008-03-22 à 17:27, Michel Fortin a écrit :


2-tier list indented by three spaces:
http://michelf.com/projects/babelmark/?markdown=*+what%27s+up%3F%0D%0A+++*+ok

Now, on this one, I must say I have mixed feelings, since
python-markdown is the only implementation that follows "Markdown
Syntax"  and treats the item indented by three spaces as being at the
same level.  Makes me feel like a naive fool for following the  
"spec".

:)


Well, you've been following the official spec; no one should call  
you a fool for that. But it certainly doesn't give much leverage to  
the idea of keeping the spec as it is.


It should be mentioned that, in addition to Python Markdown, both  
markdown.lua and Pandoc seem to follow the spec regarding list  
indentation.



Michel Fortin
[EMAIL PROTECTED]
http://michelf.com/


___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: [ANN] Babelmark

2008-03-23 Thread Aristotle Pagaltzis
* Tomas Doran <[EMAIL PROTECTED]> [2008-03-23 13:10]:
> I've got [Devel::Cover] to measure coverage, and it (on [my
> trunk], which is close to 1.0.17) says that my coverage is
> almost perfect:
>
> Filestmt   bran   condsub   time  total
>  -- -- -- -- -- --
> blib/lib/Text/Markdown.pm  99.8   94.2   72.0  100.0  100.0   87.0   
> 96.9
>
> Which is *just wrong* - as I know there are piles of corner
> cases that my tests don't adequately cover. :(
>
> Probably a lesson to point out that automated coverage analysis
> isn't too useful in some cases...
>
> [Devel::Cover]: 
> http://search.cpan.org/~pjcj/Devel-Cover-0.63/lib/Devel/Cover.pm
> [my trunk]: http://svn.kulp.ch/cpan/text_multimarkdown/trunk/

Yes, well. If you write one test case that causes the code to
perform a particular pattern match, then the match expression is
considered covered… even if uses a 500-line regex that parses an
entire file format.

This problem basically occurs whenever a separate language is
embedded into the main code: SQL queries, XPath expressions,
templates in some template mini-language, whatever. If the
coverage metric doesn’t cross the language barrier right along
with the code, it breaks down at these points.

Regards,
-- 
Aristotle Pagaltzis // 
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: [ANN] Babelmark

2008-03-23 Thread Yuri Takhteyev
>  Unfortunatly, my web host doesn't do Ruby, nor Java, C# or Lua, so the
>  online version is missing a couple of interesting implementations.

If your host allows you to ssh and has make, then building Lua is very simple:

mkdir ~/lua  # or some other directory
wget http://sputnik.freewisdom.org/files/easy-lua-install-2007-01-18
bash easy-lua-install-2007-01-18 --without-readline --prefix=/home/yuri/lua/
cd share/lua/5.1/
wget www.frykholm.se/files/markdown.lua
~/lua/bin/lua

This will get you the interactive prompt:

Lua 5.1.2  Copyright (C) 1994-2007 Lua.org, PUC-Rio
> require"markdown"
> =markdown("oh _hai_")

oh hai

>  Locally on my computer Babelmark also do BlueCloth, Maruku, MarkdownJ,
>  markdown.lua, and Pandoc. I'm very sorry if your Markdown
>  implementation can't be part of Babelmark online, but if anyone has a
>  better host to offer for Babelmark, ideally with support for all of
>  these, I'd gladly send him the scripts.

I can try and see how far I get on webfaction.  Can you send me the scripts?

  - yuri

-- 
http://sputnik.freewisdom.org/
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: [ANN] Babelmark

2008-03-23 Thread Joseph Lorenzo Hall
On Sun, Mar 23, 2008 at 5:44 AM, Fletcher T. Penney
<[EMAIL PROTECTED]> wrote:
> One problem with babelmark - the CSS is such that a long line of
>  output (or input) forces the body off the left side of the page.
>
>
>  For an example, try the following text in the babelmark text source:
>
>  Test footnote.[^1][].
>
>  [^1]: This is a footnote.

or this:

http://michelf.com/projects/babelmark/?markdown=aa
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


MultiMarkdown 2.0.b5 Released

2008-03-23 Thread Fletcher T. Penney
I have released version 2.0.b5 of MultiMarkdown today.  As always, it  
can be downloaded from:




Some of the changes include:

* spaces at end of xslt filenames won't cause failure

* use `\url{}` for "non-referenced" url's in LaTeX to allow linebreaks  
(though

  they still don't always break correctly --- this is a problem with
  `hyperref` not MMD)

* don't convert `^` to exponents in the `clean-text-allow-latex.xslt`  
file so

  that math code works properly

* the S5 XSLT file at least partially works again now

* update the TextMate bundle to work with Leopard

* updated the envelope and letterhead files

* include `6x9book-real-poetry` XSLT that uses memoir's poetry  
features fairly

  well

* rework the `clean-text` files to make them easier to update in the  
future

  and more modular

* XHTML comments are now passed through as raw LaTeX

* unescape encoding within comments



Fletcher

--
Fletcher T. Penney
[EMAIL PROTECTED]

24 hours in a day, 24 beers in a case. Coincidence?
- Steven Wright



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: [ANN] Babelmark

2008-03-23 Thread Fletcher T. Penney
One problem with babelmark - the CSS is such that a long line of  
output (or input) forces the body off the left side of the page.



For an example, try the following text in the babelmark text source:

Test footnote.[^1][].

[^1]: This is a footnote.



F-

--
Fletcher T. Penney
[EMAIL PROTECTED]

Failure is the condiment that gives success its flavor.
- Truman Capote



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: [ANN] Babelmark

2008-03-23 Thread Fletcher T. Penney
Agreed.  Assuming that it's minimal effort to leave both in, I think  
it's better to leave as many options in babelmark as possible.  When I  
add a new feature or "fix" something in MultiMarkdown, it may break  
something else, or it may work differently in my implementation than  
in Tomas'.


By having these different flavors in one place, it will make it much  
easier to keep small unintentional "drifts" from occurring between  
"dialects".


Ideally, the only differences would occur as related to syntax  
features that are implemented in one dialect, and not in another.



Another benefit is the ability to merge similar features that are  
implemented differently.  For example, when Michel added footnote  
support to PHP Markdown Extra that was almost the same as the approach  
I had used in MultiMarkdown, it was easy for me to change the XHTML  
syntax so that they were compatible (though it appears they have  
drifted apart again...)


F-

On Mar 23, 2008, at 8:13 AM, Tomas Doran wrote:


Yes, please also keep Text::MultiMarkdown. This is actually *much  
more* different to fletcher's MultiMarkdown than Text::Markdown is  
to Markdown.pl - as with my refactoring, MultiMarkdown is able to  
just overload / hook into Text::Markdown (as I've created the  
relevant hook points), as opposed to being a copy & paste of  
original markdown with bits stuck on the side.. (No offense meant  
here - I'm only able to do this as I'm *also* maintaining a fork of  
Markdown).


Again, I'm aiming form *zero difference* between Text::MultiMarkdown  
and 'official' MultiMarkdown, except for bugs that I've fixed (so we  
shouldn't *expect* difference, and if it's found,  and I don't have  
an explicit test in my distribution to cover it - it's a bug in my  
code and I *will fix it*).. My code does pass all of Fletcher's test  
suite, so I'm sure it's pretty similar. ;)


As previously noted, s/MultiMarkdown/Markdown/g; s/Fletcher/John/g;  
in the paragraph above is also be true.


Cheers
Tom




--
Fletcher T. Penney
[EMAIL PROTECTED]

On two occasions I have been asked [by members of Parliament], 'Pray,
Mr. Babbage, if you put into the machine wrong figures, will the right
answers come out?' I am not able rightly to apprehend the kind of
confusion of ideas that could provoke such a question.
- Charles Babbage



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: Text::Markdown vs MDTest (Was: Re: forking Markdown.pl?)

2008-03-23 Thread Tomas Doran


On 22 Mar 2008, at 18:04, Michel Fortin wrote:
2) Write a wrapper for mdtest.php to convert it's output into TAP  
format so that it can/will be run as part of my test suite if php5  
is available. (Or, I can write php - would you take a patch to  
output TAP format as an option so that I don't have to re-parse  
your output?)


I'd gladly accept a patch.


Awesome, will do.

...but I'm not sure I get what your plan is: do you intend to do  
both 1 *and* 2?


Yes. :)

More testing is always better, and if there are corner cases where my  
whitespace normaliser doesn't agree with yours (and one fails a test  
but the other doesn't) - then we should give the smoke tests  
opportunity to find them...



3) Compare all of my tests to see which I'd like to add to MDTest.


Or perhaps I could just add all of your tests as a separate testsuite.


That sounds reasonable, and was pretty much what I was thinking of. I  
may / will probably need two test suites, one for Text::Markdown, and  
one for Text::MultiMarkdown.


Cheers
Tom



___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: [ANN] Babelmark

2008-03-23 Thread Tomas Doran


On 23 Mar 2008, at 03:50, Michel Fortin wrote:


Le 2008-03-22 à 21:15, Fletcher T. Penney a écrit :

Any reason for including Text::MultiMarkdown and not the official  
MultiMarkdown itself?


Hum, because I just took what was bundled with Text::Markdown; it  
was easier that way and I though it was the same thing just  
packaged differently. Perhaps I shouldn't have.


It's the same thing in the same way that Text::Markdown is "just  
markdown, packaged differently".




It would be useful for finding any areas where the two versions  
differ from each other, in addition to where MMD differs from  
other implementations.


But should we expect any difference? I agree that I should be using  
the official MultiMarkdown -- and I've added it now --, but is it  
still worth keeping Text::MultiMarkdown then?




Yes, please also keep Text::MultiMarkdown. This is actually *much  
more* different to fletcher's MultiMarkdown than Text::Markdown is to  
Markdown.pl - as with my refactoring, MultiMarkdown is able to just  
overload / hook into Text::Markdown (as I've created the relevant  
hook points), as opposed to being a copy & paste of original markdown  
with bits stuck on the side.. (No offense meant here - I'm only able  
to do this as I'm *also* maintaining a fork of Markdown).


Again, I'm aiming form *zero difference* between Text::MultiMarkdown  
and 'official' MultiMarkdown, except for bugs that I've fixed (so we  
shouldn't *expect* difference, and if it's found,  and I don't have  
an explicit test in my distribution to cover it - it's a bug in my  
code and I *will fix it*).. My code does pass all of Fletcher's test  
suite, so I'm sure it's pretty similar. ;)


As previously noted, s/MultiMarkdown/Markdown/g; s/Fletcher/John/g;  
in the paragraph above is also be true.


Cheers
Tom

___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: [ANN] Babelmark

2008-03-23 Thread Tomas Doran


On 22 Mar 2008, at 21:47, Aristotle Pagaltzis wrote:


* Michel Fortin <[EMAIL PROTECTED]> [2008-03-22 22:30]:

The more implementations can pass each other's testsuite the
better interoperability we'll have achieved.


(Assuming, of course, that the test suite covers enough edge and
corner cases.)


I'd say that that is directly proportional to the utility of the test  
suite ;-)


I've got [Devel::Cover] to measure coverage, and it (on [my trunk],  
which is close to 1.0.17) says that my coverage is almost perfect:


Filestmt   bran   condsub   time   
total

 -- -- -- -- -- --
blib/lib/Text/Markdown.pm  99.8   94.2   72.0  100.0  100.0
87.0   96.9


Which is *just wrong* - as I know there are piles of corner cases  
that my tests don't adequately cover. :(


Probably a lesson to point out that automated coverage analysis isn't  
too useful in some cases...


[Devel::Cover]: http://search.cpan.org/~pjcj/Devel-Cover-0.63/lib/ 
Devel/Cover.pm

[my trunk]: http://svn.kulp.ch/cpan/text_multimarkdown/trunk/

Cheers
Tom

___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: [ANN] Babelmark

2008-03-23 Thread Tomas Doran


On 22 Mar 2008, at 17:09, Michel Fortin wrote:

I'm currently attempting to write a spec for parsing Markdown  
Extra, and since one goal is to minimize the differences in output  
between implementations, I've made a tool allowing me to compare  
who does what for any given input. I hope this can also facilitate  
future discussions about the syntax.


So here's Babelmark, a testbed for various Markdown implementations  
were you give the input and you get the HTML output for Markdown.pl  
1.0.1 and 1.0.2b8, PHP Markdown and PHP Markdown Extra, Python  
Markdown, Text::Markdown and Text::MultiMarkdown, and finally  
Showdown.




This is really totally awesome :)


Unfortunatly, my web host doesn't do Ruby, nor Java, C# or Lua, so  
the online version is missing a couple of interesting  
implementations. Locally on my computer Babelmark also do  
BlueCloth, Maruku, MarkdownJ, markdown.lua, and Pandoc. I'm very  
sorry if your Markdown implementation can't be part of Babelmark  
online, but if anyone has a better host to offer for Babelmark,  
ideally with support for all of these, I'd gladly send him the  
scripts.




I should be able to do all (or at least most of) the above, can I get  
a copy of the code (or access to the source control where it's  
located?).


It would be interesting to be able to track 'should be like'  
implementations (for me, especially) - what would be good is some  
system that emailed me 'aggh' emails every time someone typed  
something and Text::Markdown was different to Markdown.pl.. However  
that would be trivially easy to spam me with, so might need some  
careful thought. ;)


Cheers
Tom
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss