Your example code seems to trigger a bug in MARKMIN, when using the
link and the image tag in a list:

## snip ##
>>> content = """... # My slides title... ## Slide One... this allows you to 
>>> create slides using markmin... ## Slide Two... - you can use lists... - you 
>>> can use [[links http://www.google.com]]... - you can use images [[image 
>>> http://image.example.com center]]... """>>> print MARKMIN(content)<h1>My 
>>> slides title</h1><h2>Slide One</h2><p>this allows you to create slides 
>>> using markmin</p><h2>Slide Two</h2><ul><li>you can use lists</li><li>you 
>>> can use <img src="http://image.example.com"; alt="links <a 
>>> href="http://www.google.com";>http://www.google.com</a>]]</li><li>you can 
>>> use images [[image" align="center" /></li></ul>

## snap ##

The generated html link including the link scope "links" is inserted
into the alt attribute.

It works when separating the image from the list:

## snip ##
>>> content = """
... # My slides title
... ## Slide One
... this allows you to create slides using markmin
... ## Slide Two
... - you can use lists
... - you can use [[links http://www.google.com]]
... you can use images [[image http://image.example.com center]]
... """
>>> print MARKMIN(content)
<h1>My slides title</h1><h2>Slide One</h2><p>this allows you to create
slides using markmin</p><h2>Slide Two</h2><ul><li>you can use lists</
li><li>you can use <a href="http://www.google.com";>links</a></li></ul>
you can use images <img src="http://image.example.com"; alt="image"
align="center" />
## snap ##

Regards,

Jan



On 11 Okt., 16:17, Massimo Di Pierro <massimo.dipie...@gmail.com>
wrote:
> I do not understand the bug. Can you provide an example?
>
> On Oct 11, 5:28 am, peter <peterchutchin...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Using windows, and web2py version 1.99.2, if I setup a simple
> > applicatioin, add slides.py and the test as per your instructions:
>
> > Things only half work. The link does not work, it says
>
> > "you can use
>
> >http://www.google.com]]
> > "
>
> > "you can use images [[image" align="center" />
> > "
>
> > If one tries emboldening words, they do no appear emboldened.
>
> > This is a nice little addition to web2py, but it appears there is a
> > bug.
>
> > Thanks again for all you work Massimo.
>
> > Peter
>
> > On Sep 13, 6:31 am, Andrew <awillima...@gmail.com> wrote:
>
> > > Whilst on the subject of [[ image tags in markmin,  how do I reference
> > > a local image ?  Can I use the URL function ?
>
> > > On Sep 13, 4:11 pm, guruyaya <guruy...@gmail.com> wrote:
>
> > > > Well, oddly it works the other way for me. I'll look into it later
> > > > today.
>
> > > > On Sep 12, 3:20 am, Massimo Di Pierro <massimo.dipie...@gmail.com>
> > > > wrote:
>
> > > > > markmin requires [[...]] not [...]
>
> > > > > On Sep 11, 2:29 pm, guruyaya <guruy...@gmail.com> wrote:
>
> > > > > > Ummm, why are you using [[ for links and images instead of just one
> > > > > > [ ? It doesn't work for me, when I user the [[ syntax.
>
> > > > > > On Sep 11, 1:36 am, Massimo Di Pierro <massimo.dipie...@gmail.com>
> > > > > > wrote:
>
> > > > > > > No. It makes the view. You just return it.
>
> > > > > > > On Sep 10, 3:53 pm, António Ramos <ramstei...@gmail.com> wrote:
>
> > > > > > > > Humm, dont i need a view?
>
> > > > > > > > Em 10 de setembro de 2011 21:52, António Ramos 
> > > > > > > > <ramstei...@gmail.com>escreveu:
>
> > > > > > > > > Working now :)
>
> > > > > > > > > Em 10 de setembro de 2011 21:29, António Ramos 
> > > > > > > > > <ramstei...@gmail.com>escreveu:
>
> > > > > > > > > Traceback (most recent call last):
> > > > > > > > >> File "gluon/restricted.py", line 191, in restricted
> > > > > > > > >> File "gluon/restricted.py", line 178, in compile2
> > > > > > > > >> TypeError: compile() expected string without null bytes
>
> > > > > > > > >> :(
>
> > > > > > > > >> Just a screenshot please
>
> > > > > > > > >> 2011/9/10 Michele Comitini <michele.comit...@gmail.com>
>
> > > > > > > > >>> +1
>
> > > > > > > > >>> Terrific!
>
> > > > > > > > >>> mic
> > > > > > > > >>> Il giorno 10/set/2011 21:24, "Massimo Di Pierro" <
> > > > > > > > >>> mdipie...@cs.depaul.edu> ha scritto:
>
> > > > > > > > >>> > Based on desk.js now you can do this
>
> > > > > > > > >>> > Put the attached slide.py under models (any app).
>
> > > > > > > > >>> > Write a controller like
>
> > > > > > > > >>> > def test():
> > > > > > > > >>> > content = """
> > > > > > > > >>> > # My slides title
> > > > > > > > >>> > ## Slide One
> > > > > > > > >>> > this allows you to create slides using markmin
> > > > > > > > >>> > ## Slide Two
> > > > > > > > >>> > - you can use lists
> > > > > > > > >>> > - you can use [[linkshttp://www.google.com]]
> > > > > > > > >>> > - you can use images 
> > > > > > > > >>> > [[imagehttp://image.example.comcenter]]
> > > > > > > > >>> > """
> > > > > > > > >>> > return SLIDE(content,title="My slides")
>
> > > > > > > > >>> > Notice the resulting file is pure html5 with external 
> > > > > > > > >>> > links therefore
> > > > > > > > >>> it can be downloaded as an independent document.

Reply via email to