Ok, maybe my explanation was too long.

Let's look at a simple example:
I have installed
https://mdipierro.pythonanywhere.com/examples/static/web2py_win.zip

Now a controller:


def mmtest():
    t="""

-----------
  This is an ordered list:
  + Item 1
  + Item 2
---------:blockquoteclass[blockquoteid]

"""
    return MARKMIN(t)

​The expected result is:

<blockquote class="blockquoteclass" id="markmin_blockquoteid"><p>This is an
ordered list:</p><ol><li>Item 1</li><li>Item 2</li></ol></blockquote>


But instead I get:​

​
​
<blockquote class="blockquoteclass" id="markmin_blockquoteid">  This is an
ordered list:
  + Item 1
  + Item 2</blockquote>


Why?
Look at line 1212 in
https://github.com/web2py/web2py/blob/master/gluon/contrib/markmin/markmin2html.py

'\n'.join(strings[bq_begin:lineno]), pp)



If markmin detects a blockquote, it joins the whole text inside and does
nothing else.

Now change this line to

render('\n'.join(strings[bq_begin:lineno])), pp)


and you will get the expected result.

And there is another problem in this new markmin2html.py:
It needs now gluon and therefore it is not longer a standalone program.

And: all links in the lines 228 ... 230 do not work.


2017-07-03 21:22 GMT+03:00 Richard Vézina <ml.richard.vez...@gmail.com>:

> I don't understand what you mean... This is what in gluon/contrib/markmin
> : https://github.com/web2py/web2py/blob/master/gluon/
> contrib/markmin/markmin2html.py
>
> For sure it has change over time...
>
> I was suggesting to use Blame : https://github.com/web2py/
> web2py/blame/master/gluon/contrib/markmin/markmin2html.py
>
> To identify the change that cause the issue you found and try to fix it...
>
> Richard
>
> On Mon, Jul 3, 2017 at 2:11 PM, Martin Weissenboeck <mweis...@gmail.com>
> wrote:
>
>> I have found an old thread about the same problem
>> https://mail.google.com/mail/u/0/#search/markmin+blockquote/
>> 14a8c05a08025b93
>>
>> It seems that there are a lot of different versions of markmin2html.py in
>> the web.
>>
>> I have opened issue #1671.
>> It contains a proposal for a solution.
>>
>> Regards, Martin
>>
>>
>> 2017-07-03 18:27 GMT+03:00 Richard Vézina <ml.richard.vez...@gmail.com>:
>>
>>> Can you identify a commit that trigger the issue you observe or it has
>>> always be there??
>>>
>>> Can you fix it?? Please submit a PR over github if you can...
>>>
>>> Richard
>>>
>>> On Sat, Jul 1, 2017 at 6:57 AM, Martin Weissenboeck <mweis...@gmail.com>
>>> wrote:
>>>
>>>> There is the folloging code at the end of
>>>> def parse_table_or_blockquote(s, mtag, lineno):
>>>> in markmin2html.py
>>>>
>>>>     s = '<blockquote%s%s>%s</blockquote>%s' \
>>>>           % (t_cls,
>>>>              t.id,
>>>>              '\n'.join(strings[bq_begin:lineno]),
>>>>              pp)
>>>>     mtag = 'q'
>>>>
>>>> All lines inside the blockquote are only joined, without any other
>>>> interpretation. Maybe some code is missing?
>>>>
>>>>
>>>>
>>>>
>>>> 2017-06-29 5:44 GMT+03:00 Martin Weissenboeck <mweis...@gmail.com>:
>>>>
>>>>> I have run the markmin2html.py file. The results of blockquotes are
>>>>> not as expected, e.g.:
>>>>>
>>>>> ​This is a blockquote with a list with tables in it:
>>>>>
>>>>> This is a paragraph before list. You can continue paragraph on the
>>>>> next lines. This is an ordered list with tables: + Item 1 + Item 2 +
>>>>> -------- aa|bb|cc 11|22|33 --------:tableclass1[tableid1] + Item 4
>>>>> ----------- T1| T2| t3 =========== aaa|bbb|ccc ddd|fff|ggg 123|0 |5.0
>>>>> -----------:tableclass1
>>>>>
>>>>> This this a new paragraph with a followed table. Table has header,
>>>>> footer, sections, odd and even rows:​
>>>>>
>>>>>
>>>>>
>>>>> ​The same problem is with the other blockquote exaples.
>>>>> What is wrong?
>>>>>
>>>>> Regards, Martin​
>>>>>
>>>>> ​
>>>>>
>>>>
>>>>
>>>> --
>>>> Resources:
>>>> - http://web2py.com
>>>> - http://web2py.com/book (Documentation)
>>>> - http://github.com/web2py/web2py (Source code)
>>>> - https://code.google.com/p/web2py/issues/list (Report Issues)
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "web2py-users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to web2py+unsubscr...@googlegroups.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>> --
>>> Resources:
>>> - http://web2py.com
>>> - http://web2py.com/book (Documentation)
>>> - http://github.com/web2py/web2py (Source code)
>>> - https://code.google.com/p/web2py/issues/list (Report Issues)
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "web2py-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to web2py+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>>
>> --
>> Resources:
>> - http://web2py.com
>> - http://web2py.com/book (Documentation)
>> - http://github.com/web2py/web2py (Source code)
>> - https://code.google.com/p/web2py/issues/list (Report Issues)
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "web2py-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to web2py+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to