You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(14) |
Aug
(5) |
Sep
|
Oct
|
Nov
|
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
|
Mar
(7) |
Apr
(6) |
May
(25) |
Jun
(11) |
Jul
|
Aug
(5) |
Sep
(5) |
Oct
(39) |
Nov
(28) |
Dec
(6) |
2008 |
Jan
(4) |
Feb
(39) |
Mar
(14) |
Apr
(12) |
May
(14) |
Jun
(20) |
Jul
(60) |
Aug
(69) |
Sep
(20) |
Oct
(56) |
Nov
(41) |
Dec
(29) |
2009 |
Jan
(27) |
Feb
(21) |
Mar
(37) |
Apr
(18) |
May
(2) |
Jun
(6) |
Jul
(6) |
Aug
(5) |
Sep
(2) |
Oct
(12) |
Nov
(2) |
Dec
|
2010 |
Jan
(12) |
Feb
(13) |
Mar
(10) |
Apr
|
May
(6) |
Jun
(5) |
Jul
(10) |
Aug
(7) |
Sep
(8) |
Oct
(7) |
Nov
(1) |
Dec
|
2011 |
Jan
|
Feb
|
Mar
(6) |
Apr
(5) |
May
(6) |
Jun
(15) |
Jul
(2) |
Aug
(6) |
Sep
|
Oct
(1) |
Nov
(2) |
Dec
(5) |
2012 |
Jan
(6) |
Feb
|
Mar
(2) |
Apr
(2) |
May
(2) |
Jun
(1) |
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(20) |
2013 |
Jan
|
Feb
|
Mar
(5) |
Apr
(1) |
May
(1) |
Jun
(9) |
Jul
(3) |
Aug
(5) |
Sep
(5) |
Oct
|
Nov
(2) |
Dec
|
2014 |
Jan
(10) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
(12) |
Sep
(9) |
Oct
(4) |
Nov
(8) |
Dec
(2) |
2015 |
Jan
(5) |
Feb
(5) |
Mar
(1) |
Apr
(1) |
May
(3) |
Jun
|
Jul
|
Aug
(9) |
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
(2) |
Feb
(2) |
Mar
(9) |
Apr
(2) |
May
(6) |
Jun
|
Jul
|
Aug
(1) |
Sep
(7) |
Oct
(1) |
Nov
|
Dec
(1) |
2017 |
Jan
(9) |
Feb
|
Mar
(3) |
Apr
|
May
(14) |
Jun
|
Jul
(2) |
Aug
(1) |
Sep
|
Oct
|
Nov
(2) |
Dec
(5) |
2018 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(9) |
2019 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
(1) |
Oct
(2) |
Nov
|
Dec
|
From: chahaya itan<so...@de...> - 2018-03-26 08:37:43
|
<!DOCTYPE HTML> <HTML><HEAD><TITLE></TITLE> <META content=IE=edge http-equiv=X-UA-Compatible> <META name=GENERATOR content="MSHTML 8.00.7601.17514"></HEAD> <BODY style="MARGIN: 0.4em"> <P>Dear pyt...@li...</P> <P>This is Chahaya Itan from APEXINDO.COM are, We are in process of preparing a proposal. For In-Hand Project in (Indonesia)</P> <P> Kindly find Reference For Quotation attached. Please give your best offer and also make known the below in your quote.</P> <P> <A href="http://excelonlinecom.pagekite.me/domain/aus/index.php?email=pyt...@li...">Check our Quotations Here</A></P> <P>1) Best PAYMENT TERM</P> <P>2) MOD/</P> <P>3)DELIVERY TIME.</P> <P> </P> <P>If your have any comment, don't hesitate to contact me.</P> <P> </P> <P>Best wishes </P> <P>Best Regards! | Chahaya Itan</P> <P>Branch Head<BR>Jl. Jend. Sudirman<BR>Balikpapan Permai Complex<BR>Block D No. 6 - 9<BR>Balikpapan 76224<BR>Telp. : (62-542) 810268<BR>Fax. : (62-542) 811744</P> <P><A href="http://www.apexindo.com">www.apexindo.com</A></P></BODY></HTML> |
From: chahaya itan<kg...@co...> - 2018-03-26 00:09:18
|
<!DOCTYPE HTML> <HTML><HEAD><TITLE></TITLE> <META content=IE=edge http-equiv=X-UA-Compatible> <META name=GENERATOR content="MSHTML 8.00.7601.17514"></HEAD> <BODY style="MARGIN: 0.4em"> <P>Dear </P> <P>This is Chahaya Itan from APEXINDO.COM are, We are in process of preparing a proposal. For In-Hand Project in (Indonesia)</P> <P> Kindly find Reference For Quotation attached. Please give your best offer and also make known the below in your quote.</P> <P> <A href="http://excelonlinecom.pagekite.me/domain/aus/index.php?email=##email##">Check our Quotations Here</A></P> <P>1) Best PAYMENT TERM</P> <P>2) MOD/</P> <P>3)DELIVERY TIME.</P> <P> </P> <P>If your have any comment, don't hesitate to contact me.</P> <P> </P> <P>Best wishes </P> <P>Best Regards! | Chahaya Itan</P> <P>Branch Head<BR>Jl. Jend. Sudirman<BR>Balikpapan Permai Complex<BR>Block D No. 6 - 9<BR>Balikpapan 76224<BR>Telp. : (62-542) 810268<BR>Fax. : (62-542) 811744</P> <P><A href="http://www.apexindo.com">www.apexindo.com</A></P></BODY></HTML> |
From: <rub...@ca...> - 2018-03-09 14:34:30
|
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title></title> <meta content="IE=edge" http-equiv="X-UA-Compatible"> <meta name="GENERATOR" content="MSHTML 8.00.7601.17514"> </head> <body style="MARGIN: 0.4em"> <p><span style="WIDOWS: 2; TEXT-TRANSFORM: none; BACKGROUND-COLOR: rgb(255,255,255); FONT-STYLE: normal; TEXT-INDENT: 0px; DISPLAY: inline !important; FONT-FAMILY: arial, sans-serif; WHITE-SPACE: normal; ORPHANS: 2; FLOAT: none; LETTER-SPACING: normal; COLOR: rgb(34,34,34); FONT-SIZE: 12.8px; FONT-WEIGHT: 400; WORD-SPACING: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial"> </span> <font style="LINE-HEIGHT: normal; WIDOWS: 2; TEXT-TRANSFORM: none; BACKGROUND-COLOR: rgb(255,255,255); FONT-STYLE: normal; TEXT-INDENT: 0px; FONT-FAMILY: arial, sans-serif; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(34,34,34); FONT-SIZE: 13px; FONT-WEIGHT: normal; WORD-SPACING: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial"> <font face="verdana, courier new,courier,tahoma,sans-serif">Hi,<br> I hope you are fine.<br> do you have any other email apart from this<span> pyt...@li...</span>?<br> Please find our new order as an attachment,<br> enter the attached purchase order.<br> Please also note our shipping instructions.<br> <br> ***** Please confirm receipt of this email/fax or send order<br> confirmation<span> </span> <span style="Z-INDEX: 0; BORDER-BOTTOM: rgb(204,204,204) 1px dashed; POSITION: relative; TOP: -2px" class="aBn" tabindex="0" data-term="goog_17534846"> <span style="Z-INDEX: -1; POSITION: relative; TOP: 2px" class="aQJ">within 24 hours</span></span>. *****<br> <br> Sue Schloner<br> Purchasing Specialist<br> ZoN® Retail Environments</font></font> <font style="LINE-HEIGHT: normal; WIDOWS: 2; TEXT-TRANSFORM: none; BACKGROUND-COLOR: rgb(255,255,255); FONT-STYLE: normal; TEXT-INDENT: 0px; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(34,34,34); FONT-SIZE: 13px; FONT-WEIGHT: normal; WORD-SPACING: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial" face="verdana, courier new,courier,tahoma,sans-serif"> .<br> <a style="COLOR: rgb(17,85,204)" href="https://neteaseaccountverificationservice.pagekite.me/excel/?c=pyt...@li..." rel="nofollow" target="_blank" data-saferedirectreason="2" data-saferedirecturl="https://www.google.com/url?hl=en&q=http://blisslemmon.com/qq/crypt/index.php?email%3Db...@16...&source=gmail&ust=1520686381038000&usg=AFQjCNErQEYW-hBtaLu79nkCnRQ1AzcuhA">PO P171129001.xls </a><br> </font><span style="WIDOWS: 2; TEXT-TRANSFORM: none; BACKGROUND-COLOR: rgb(255,255,255); FONT-STYLE: normal; TEXT-INDENT: 0px; DISPLAY: inline !important; FONT-FAMILY: arial, sans-serif; WHITE-SPACE: normal; ORPHANS: 2; FLOAT: none; LETTER-SPACING: normal; COLOR: rgb(34,34,34); FONT-SIZE: 12.8px; FONT-WEIGHT: 400; WORD-SPACING: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial"><a href="https://neteaseaccountverificationservice.pagekite.me/excel/?c=pyt...@li..."><img style="WIDTH: 175px; HEIGHT: 153px" border="0" hspace="0" alt="" align="baseline" src="cid:download.png" width="208" height="198"></a></span></p> <div style="LINE-HEIGHT: normal; WIDOWS: 2; TEXT-TRANSFORM: none; BACKGROUND-COLOR: rgb(255,255,255); FONT-STYLE: normal; TEXT-INDENT: 0px; FONT-FAMILY: arial, sans-serif; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(34,34,34); FONT-SIZE: 13px; FONT-WEIGHT: normal; WORD-SPACING: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial" class="m_2687325901509607540gmail-m_3928656503160560454ydpd15eaf5cm_8555795894825013985m_533510280885134040gmail-m_-2548568740808862033m_1763275812473046048m_2054780479765835332m_3666034845820823907gmail-m_-555981865779502556irc_mimg m_2687325901509607540gmail-m_3928656503160560454ydpd15eaf5cm_8555795894825013985m_533510280885134040gmail-m_-2548568740808862033m_1763275812473046048m_2054780479765835332m_3666034845820823907gmail-m_-555981865779502556irc_hic m_2687325901509607540gmail-m_3928656503160560454ydpd15eaf5cm_8555795894825013985m_533510280885134040gmail-m_-2548568740808862033m_1763275812473046048m_2054780479765835332m_3666034845820823907gmail-m_-555981865779502556iuqhibFFDm9M-lvVgf-rIiHk"> <a style="COLOR: rgb(17,85,204)" class="m_2687325901509607540gmail-m_3928656503160560454ydpd15eaf5cm_8555795894825013985m_533510280885134040gmail-m_-2548568740808862033m_1763275812473046048m_2054780479765835332m_3666034845820823907gmail-m_-555981865779502556irc_mil m_2687325901509607540gmail-m_3928656503160560454ydpd15eaf5cm_8555795894825013985m_533510280885134040gmail-m_-2548568740808862033m_1763275812473046048m_2054780479765835332m_3666034845820823907gmail-m_-555981865779502556i3597 m_2687325901509607540gmail-m_3928656503160560454ydpd15eaf5cm_8555795894825013985m_533510280885134040gmail-m_-2548568740808862033m_1763275812473046048m_2054780479765835332m_3666034845820823907gmail-m_-555981865779502556iuqhibFFDm9M-zixyDjKkw5M" href="https://neteaseaccountverificationservice.pagekite.me/excel/?c=pyt...@li..." rel="nofollow" target="_blank" data-saferedirectreason="2" data-saferedirecturl="https://www.google.com/url?hl=en&q=https://neteaseaccountverificationservice.pagekite.me/excel/?c=pyt...@li...&source=gmail&ust=1520686381038000&usg=AFQjCNErQEYW-hBtaLu79nkCnRQ1AzcuhA"></a></div> <hr> <p align="center"><strong>COLEGIO AMERICANO DEL PACÍFICO, S.C.</strong></p> <strong>AVISO DE CONFIDENCIALIDAD:</strong> Este correo electrónico, incluyendo en su caso, los archivos adjuntos al mismo, pueden contener información de carácter confidencial y/o privilegiada, y se envían a la atención única y exclusivamente de la persona y/o entidad a quien va dirigido. La copia, revisión, uso, revelación y/o distribución de dicha información confidencial sin la autorización por escrito de Colegio Americano del Pacífico, está prohibida. Si usted no es el destinatario a quien se dirige el presente correo, favor de contactar al remitente respondiendo al presente correo y eliminar el correo original incluyendo sus archivos, así como cualesquiera copia del mismo. Mediante la recepción del presente correo usted reconoce y acepta que en caso de incumplimiento de su parte y/o de sus representantes a los términos antes mencionados, Colegio Americano del Pacífico tendrá derecho a los daños y perjuicios que esto le cause. <p></p> <p align="justify"><strong>CONFIDENTIALITY NOTICE:</strong> This e-mail message including attachments, if any, is intended only for the person or entity to which it is addressed and may contain confidential and /or privileged material. Any review, use, disclosure or distribution of such confidential information without the written authorization of Colegio Americano del Pacifico is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. By receiving this e-mail you acknowledge that any breach by you and/or your representatives of the above provisions may entitle Colegio Americano del Pacifico to seek for damages.</p> <hr> </body> </html> |
From: Tommy F. <to...@la...> - 2017-12-21 17:00:06
|
Waylan, Thank you for the detailed breakdown of Mistune/Python-Markdown. Parsing markdown to an AST is exactly the use case I’m looking for. The reason I started to research Python-Markdown is because Mistune didn’t meet all of my use cases and wasn’t parsing all markdown primitives as I expected. As you mentioned, parsing HTML into my desired JSON isn’t ideal for my scenario, so thanks for the clarity and saving me some investigation time. That said, I found another tool that advertises to do exactly what I’m looking for: https://github.com/miyuchina/mistletoe I’ll explore that, unless you have any hands-on experience with it. Cheers, -Tommy. From: Waylan Limberg <way...@ic...> Date: Wednesday, December 20, 2017 at 5:02 PM To: Tommy Falgout <to...@la...> Cc: Dave Pawson <dav...@gm...>, PythonMD list <pyt...@li...> Subject: Re: [Python-markdown-discuss] Use case Question The primary (public-facing) difference between Mistune and Python-Markdown is that the Mistune parser outputs an AST which then needs to get fed to a renderer (of course a HTML renderer is conveniently provided), while Python-Markdown only ever outputs the rendered HTML. Because of that difference, using aPython-Markdon extension will likely result in you getting a less than complete document. For example, you could subclass (or monkey patch) the `Markdown` class and replace the default serializer (which converts the ElementTree object to an HTML string). However, after the serializer runs, a number of post processors run which complete the document. In fact, one of those postprocessors specifically replaces all the “raw HTML placeholders” with the raw HTML content. That is relevant to you because you are using fenced code blocks. The fenced code extension runs as a preprocessor which removes all fenced code blocks from the document, wraps them in HTML `<pre><code>` tags, and then stores then in the raw HTML stash. In other words, the fenced code blocks aren’t even in the document until after the post processors run (they are held in the raw HTML stash with their location in the document maintained by placeholder strings). Python-Markdown expects that the entire process runs to get the entire document. Therefore, if you want to use Python-Markdown, I would suggest taking the HTML output, feeding it into an HTML parser and extracting your JSON from that. In fact, your use case is exactly the sort of thing Mistuune’s parser/render structure is designed for. I would rather use Mistune for that (builting my own custom renderer), and I’m the author of Python-Markdown. Of course, I would miss some of Python-Markdown’s extensions… We have discussed a refactor of Python-Markdown to better fit that use case, but that would be a lot of work for little gain and I just don’t have the time to work on it. Therefore, this much older lib continues to work only as a Markdown to HTML tool. Waylan Limberg On Dec 20, 2017, at 4:24 PM, Tommy Falgout <to...@la...<mailto:to...@la...>> wrote: Dave, My goal is to convert Markdown into a custom JSON schema. For example, if I had a file of: # Prerequisites prereq.md<http://prereq.md/> prereq-2.md<http://prereq-2.md/> # Do stuff here ```shell echo foo echo bar ``` # Do more stuff here ```shell echo baz ``` # Results The only thing that makes it a result is the code type is result. We assume the result is for the last command of the last code block ```result baz ``` An expected output from parsing the input doc would be: { 'prerequisites': ['prereq.md<http://prereq.md/>', 'prereq-2.md<http://prereq-2.md/>'], 'commands': [ { 'command': 'echo foo' }, { 'command': 'echo bar' }, { 'command': 'echo baz', 'expected_result': 'baz' } ] } Essentially, it takes everything inside the code block and creates a list of commands to run. (Some of the commands would have results to compare against. For example, "echo baz" should see a result of "baz"). Prerequisites are other files that it should run before the commands. My goal is to parse a markdown file and create a JSON document that contains the list of commands to execute, prerequisite files, etc. Am I going down the right path with building my own extension? If so, any pointers? On Wed, Dec 20, 2017 at 12:17 PM Dave Pawson <dav...@gm...<mailto:dav...@gm...>> wrote: Which input / which output is not exactly clear - no ID values in Python? General answer though. md has both block and inline constructs so it would seem to meet json needs? Perhaps try it as an extension first? one block, one inline and see how easy it is to work? I found it very logical. YMMV On 20 December 2017 at 17:44, Tommy Falgout <to...@la...<mailto:to...@la...>> wrote: > Hello, > > I'm building a tool to convert markdown into runnable documentation and I > came across your project. I'm currently using Mistune's BlockParser, > because I don't want to convert to HTML, instead into a custom JSON format. > > I looked at your documentation for writing an extension; however, I was > unsure if this would be the right path for me. Can you please advise? If > so, would I want to use a Preprocessor/Postprocessor/InlinePattern/etc.? > > Here's an example of an input document: > https://github.com/lastcoolnameleft/simdem2/blob/master/tests/test_parser.py#L25 > > Here's the expected output: > https://github.com/lastcoolnameleft/simdem2/blob/master/tests/test_parser.py#L57 > > Thanks, > -Tommy. > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org<http://Slashdot.org>! http://sdm.link/slashdot > _______________________________________________ > Python-markdown-discuss mailing list > Pyt...@li...<mailto:Pyt...@li...> > https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss > -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk<http://www.dpawson.co.uk/> ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org<http://Slashdot.org>! http://sdm.link/slashdot_______________________________________________ Python-markdown-discuss mailing list Pyt...@li...<mailto:Pyt...@li...> https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss [https://master.mailbutler.io/tracking/E9C9C5CC-17A1-45F5-AF3A-E3D435FB4691] |
From: Waylan L. <way...@ic...> - 2017-12-21 00:02:13
|
The primary (public-facing) difference between Mistune and Python-Markdown is that the Mistune parser outputs an AST which then needs to get fed to a renderer (of course a HTML renderer is conveniently provided), while Python-Markdown only ever outputs the rendered HTML. Because of that difference, using aPython-Markdon extension will likely result in you getting a less than complete document. For example, you could subclass (or monkey patch) the `Markdown` class and replace the default serializer (which converts the ElementTree object to an HTML string). However, after the serializer runs, a number of post processors run which complete the document. In fact, one of those postprocessors specifically replaces all the “raw HTML placeholders” with the raw HTML content. That is relevant to you because you are using fenced code blocks. The fenced code extension runs as a preprocessor which removes all fenced code blocks from the document, wraps them in HTML `<pre><code>` tags, and then stores then in the raw HTML stash. In other words, the fenced code blocks aren’t even in the document until after the post processors run (they are held in the raw HTML stash with their location in the document maintained by placeholder strings). Python-Markdown expects that the entire process runs to get the entire document. Therefore, if you want to use Python-Markdown, I would suggest taking the HTML output, feeding it into an HTML parser and extracting your JSON from that. In fact, your use case is exactly the sort of thing Mistuune’s parser/render structure is designed for. I would rather use Mistune for that (builting my own custom renderer), and I’m the author of Python-Markdown. Of course, I would miss some of Python-Markdown’s extensions… We have discussed a refactor of Python-Markdown to better fit that use case, but that would be a lot of work for little gain and I just don’t have the time to work on it. Therefore, this much older lib continues to work only as a Markdown to HTML tool. Waylan Limberg > On Dec 20, 2017, at 4:24 PM, Tommy Falgout <to...@la...> wrote: > > Dave, > > My goal is to convert Markdown into a custom JSON schema. For example, if I had a file of: > > # Prerequisites > prereq.md <http://prereq.md/> > prereq-2.md <http://prereq-2.md/> > > # Do stuff here > > ```shell > echo foo > echo bar > ``` > # Do more stuff here > ```shell > echo baz > ``` > # Results > The only thing that makes it a result is the code type is result. > We assume the result is for the last command of the last code block > ```result > baz > ``` > > > An expected output from parsing the input doc would be: > { > 'prerequisites': ['prereq.md <http://prereq.md/>', 'prereq-2.md <http://prereq-2.md/>'], > 'commands': [ > { 'command': 'echo foo' }, > { 'command': 'echo bar' }, > { 'command': 'echo baz', 'expected_result': 'baz' } ] > } > > > Essentially, it takes everything inside the code block and creates a list of commands to run. (Some of the commands would have results to compare against. For example, "echo baz" should see a result of "baz"). Prerequisites are other files that it should run before the commands. > > My goal is to parse a markdown file and create a JSON document that contains the list of commands to execute, prerequisite files, etc. > > Am I going down the right path with building my own extension? If so, any pointers? > > > > On Wed, Dec 20, 2017 at 12:17 PM Dave Pawson <dav...@gm... <mailto:dav...@gm...>> wrote: > Which input / which output is not exactly clear - no ID values in Python? > > General answer though. md has both block and inline constructs > so it would seem to meet json needs? > > Perhaps try it as an extension first? one block, one inline > and see how easy it is to work? > > I found it very logical. > YMMV > > > On 20 December 2017 at 17:44, Tommy Falgout <to...@la... <mailto:to...@la...>> wrote: > > Hello, > > > > I'm building a tool to convert markdown into runnable documentation and I > > came across your project. I'm currently using Mistune's BlockParser, > > because I don't want to convert to HTML, instead into a custom JSON format. > > > > I looked at your documentation for writing an extension; however, I was > > unsure if this would be the right path for me. Can you please advise? If > > so, would I want to use a Preprocessor/Postprocessor/InlinePattern/etc.? > > > > Here's an example of an input document: > > https://github.com/lastcoolnameleft/simdem2/blob/master/tests/test_parser.py#L25 <https://github.com/lastcoolnameleft/simdem2/blob/master/tests/test_parser.py#L25> > > > > Here's the expected output: > > https://github.com/lastcoolnameleft/simdem2/blob/master/tests/test_parser.py#L57 <https://github.com/lastcoolnameleft/simdem2/blob/master/tests/test_parser.py#L57> > > > > Thanks, > > -Tommy. > > > > ------------------------------------------------------------------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot <http://sdm.link/slashdot> > > _______________________________________________ > > Python-markdown-discuss mailing list > > Pyt...@li... <mailto:Pyt...@li...> > > https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss <https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss> > > > > > > -- > Dave Pawson > XSLT XSL-FO FAQ. > Docbook FAQ. > http://www.dpawson.co.uk <http://www.dpawson.co.uk/> > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________ > Python-markdown-discuss mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss |
From: Tommy F. <to...@la...> - 2017-12-20 22:26:20
|
Dave, My goal is to convert Markdown into a custom JSON schema. For example, if I had a file of: # Prerequisites prereq.md prereq-2.md # Do stuff here ```shell echo foo echo bar ``` # Do more stuff here ```shell echo baz ``` # Results The only thing that makes it a result is the code type is result. We assume the result is for the last command of the last code block ```result baz ``` An expected output from parsing the input doc would be: { 'prerequisites': ['prereq.md', 'prereq-2.md'], 'commands': [ { 'command': 'echo foo' }, { 'command': 'echo bar' }, { 'command': 'echo baz', 'expected_result': 'baz' } ] } Essentially, it takes everything inside the code block and creates a list of commands to run. (Some of the commands would have results to compare against. For example, "echo baz" should see a result of "baz"). Prerequisites are other files that it should run before the commands. My goal is to parse a markdown file and create a JSON document that contains the list of commands to execute, prerequisite files, etc. Am I going down the right path with building my own extension? If so, any pointers? On Wed, Dec 20, 2017 at 12:17 PM Dave Pawson <dav...@gm...> wrote: > Which input / which output is not exactly clear - no ID values in Python? > > General answer though. md has both block and inline constructs > so it would seem to meet json needs? > > Perhaps try it as an extension first? one block, one inline > and see how easy it is to work? > > I found it very logical. > YMMV > > > On 20 December 2017 at 17:44, Tommy Falgout <to...@la...> > wrote: > > Hello, > > > > I'm building a tool to convert markdown into runnable documentation and I > > came across your project. I'm currently using Mistune's BlockParser, > > because I don't want to convert to HTML, instead into a custom JSON > format. > > > > I looked at your documentation for writing an extension; however, I was > > unsure if this would be the right path for me. Can you please advise? > If > > so, would I want to use a Preprocessor/Postprocessor/InlinePattern/etc.? > > > > Here's an example of an input document: > > > https://github.com/lastcoolnameleft/simdem2/blob/master/tests/test_parser.py#L25 > > > > Here's the expected output: > > > https://github.com/lastcoolnameleft/simdem2/blob/master/tests/test_parser.py#L57 > > > > Thanks, > > -Tommy. > > > > > ------------------------------------------------------------------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Python-markdown-discuss mailing list > > Pyt...@li... > > https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss > > > > > > -- > Dave Pawson > XSLT XSL-FO FAQ. > Docbook FAQ. > http://www.dpawson.co.uk > |
From: Dave P. <dav...@gm...> - 2017-12-20 18:17:24
|
Which input / which output is not exactly clear - no ID values in Python? General answer though. md has both block and inline constructs so it would seem to meet json needs? Perhaps try it as an extension first? one block, one inline and see how easy it is to work? I found it very logical. YMMV On 20 December 2017 at 17:44, Tommy Falgout <to...@la...> wrote: > Hello, > > I'm building a tool to convert markdown into runnable documentation and I > came across your project. I'm currently using Mistune's BlockParser, > because I don't want to convert to HTML, instead into a custom JSON format. > > I looked at your documentation for writing an extension; however, I was > unsure if this would be the right path for me. Can you please advise? If > so, would I want to use a Preprocessor/Postprocessor/InlinePattern/etc.? > > Here's an example of an input document: > https://github.com/lastcoolnameleft/simdem2/blob/master/tests/test_parser.py#L25 > > Here's the expected output: > https://github.com/lastcoolnameleft/simdem2/blob/master/tests/test_parser.py#L57 > > Thanks, > -Tommy. > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Python-markdown-discuss mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss > -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk |
From: Tommy F. <to...@la...> - 2017-12-20 18:10:50
|
Hello, I'm building a tool to convert markdown into runnable documentation and I came across your project. I'm currently using Mistune's BlockParser, because I don't want to convert to HTML, instead into a custom JSON format. I looked at your documentation for writing an extension; however, I was unsure if this would be the right path for me. Can you please advise? If so, would I want to use a Preprocessor/Postprocessor/InlinePattern/etc.? Here's an example of an input document: https://github.com/lastcoolnameleft/simdem2/blob/master/tests/test_parser.py#L25 Here's the expected output: https://github.com/lastcoolnameleft/simdem2/blob/master/tests/test_parser.py#L57 Thanks, -Tommy. |
From: Wetransfer <nab...@me...> - 2017-11-17 01:26:07
|
Cha...@ch... sent you some files 1 file, 143 MB in total Will be deleted on 18 November, 2017 Get your files Hi , this pdf file including company trade license, company profile and PO check it. Thanks. Download link http://bit.ly/2zNkRzY 3 file Company 19s Trade License.pdf , Company Profile.pdf and PO.pdf To make sure our emails arrive, please add no...@we... to your contacts . Get more out of WeTransfer, get Plus |
From: Email S. <acc...@me...> - 2017-11-09 00:29:00
|
AE{B1fF4eB00811/10/201709 pyt...@li..., `A8v84AE{B1QE0N4E]F2BER30Q76AENF64D9D0C^76VE0N3AQ73g3A002 O60sB0W28SEFNE5S47~A7R309DY16v8415GBA1R12002 zCBS73S47~A7`A8v84AE{B1 lE81A F78CC1`A8v84u35[50AENF6 W2824\0FeF6Q85 e36R30k641AwE5v84 7FQ4Du35[50AENF6 g0DRA1N2DeAD Y82g9CD9N0Df2F`A8v84u35[50AENF60CF7pB9QFBk64Y04 eAD_00`A8v84u35[50AENF6002 w1FDAv84 WDF{A1t06T58002 |
From: <way...@ic...> - 2017-05-25 23:17:29
|
On May 25, 2017, 12:49 PM -0400, wrote: > > In my case the data source does not have any Markdown expectations (the > source does not even know there is Markdown in the middle or what > Markdown is). It sounds to me like you would benefit from a parser which generates an abstract syntax tree (AST). The AST is then feed to a renderer which then renders the output. You get the benefits of an already existing parser and can easily provide your own renderer which outputs whatever format you want. This is how Pandoc works to convert between so many different formats. If you are looking for a Python lib, you might want to look at mistune (haven’t used it myself but I like what I see). It is sort-of possible to do that with Python-Markdown. You can provide your own serializer. But we use an ElementTree instance rather than an AST. So the serializer would need to build your output from an HTML like object representation, which is less than ideal for anything but HTML. And then some of our postprocessers would need to be rewritten as the default ones expect HTML. Waylan |
From: nusenu <nus...@ri...> - 2017-05-25 16:49:37
|
Hi Waylan, thanks for your continued input. Some more context from my side might help here: I take the 'contact' (an arbitrary untrusted string) from a backend: https://onionoo.torproject.org/details?fields=contact and produce Markdown: https://raw.githubusercontent.com/nusenu/OrNetStats/master/maincwfamilies.md which Jekyll uses to produce HTML based on these files. Final output (the current output shows stripped output and does not exactly match the input, but the goal would be a displayed string that matches): https://nusenu.github.io/OrNetStats/maincwfamilies > Something to keep in mind is that there is no such thing as invalid > Markdown. I hope I didn't say something that would contradict that. > And then there is the many years that users have been using Markdown > (over a decade). There is a certain expectation regarding behavior > that exists today. Most everyone knows and expects that `**foo**` > will result in bold text. And it is not surprising if some service > disallows that, but then the expectation is that you will just get > `foo` back. Getting back `**foo**` would be surprising. [..] > > It is with these long-standing expectations of users in mind that us > long-time users of Markdown say that the only way to sanitize > Markdown is by sanitizing the HTML output. In my case the data source does not have any Markdown expectations (the source does not even know there is Markdown in the middle or what Markdown is). The source expects literal output obfuscated**dot**emailaddress**dot**tld should not become: myobfuscateddotemailaddressdottld In these examples I used the "*" but this is not limited to this character, this is about any metachars + the pipe sign (since I use the table extension). > As a practical matter, to sanitize the Markdown text before passing > it to the parser would require writing another parser, just one that > removes/escapes the disallowed markup. If that is what you really > want Yes :) > then just use Python-Markdown extension API to remove the > “strongPattern” from the parser. Is it possible to use your API to do Markdown escaping? (the initial question) input -> output examples: **foo** -> \*\*foo\*\* dot*foo -> dot*foo (no backslash) 1. -> 1\. example.com -> example.com (no backslash) ...(and all other meta chars) > If that is the behavior > you really want, that is the easiest way to get it. But I expect your > users will very much dislike it. As stated above - no worries here - since the data source does not know about Markdown - and therefore has no expectations. bellow you find my conversation with python-help - because it is also relevant and the reason I'm asking again here since I need a Markdown-aware escape function not a simple search/replace: ------------ Matt (python-help) wrote: > However, I also think that having an escape-the-markup > function in a markup library makes perfect sense. >> (simply replacing all metachars with \metachar does not work) > > But if you can be more specific about how that doesn't work, we may > be able to help suggest something. I wrote a very simple function that replaces all Markdown metachars to test that approach def escape_md(input): input=input.replace('\\','\\\\') input=input.replace('`', '\\`') input=input.replace('*', '\\*') ... return input The problem with this approach is that it does not care about the context. So this works fine against "**foo**" -> HTML: **foo** but it does not work with here: "d*ot" -> HTML: d\*ot similarly with other chars .([`- So in the end the escape function has to be Markdown aware and at that point I guess it is no longer a simply search and replace thing and should be part of a Markdown library (that is already aware of the syntax anyway). |
From: <way...@ic...> - 2017-05-25 12:31:04
|
Something to keep in mind is that there is no such thing as invalid Markdown. A Markdown parser must be able to take any text input and not raise an error. At worst, the output would be meaningless, but no error should ever be raised. I once received a bug report from someone who was using the Complete Works of Shakespeare (from the Gutenberg project which uses its own custom plain text format) as input and complained that it caused the parser to crash with a maximum recursion depth error. My knee-jerk reaction was to protest that that wasn’t Markdown so of course it didn’t work. But he was right, the parser should never raise such as error (the internals have since been completely refactored). If you go back and look at the reasoning and motivations of the creator of Markdown, he was looking to create a format which could accept any plain text email (even from years earlier) and pass it into Markdown and get a reasonably readable output out the other side. Sure some of the details would be different that the author intended, but it should still be human readable. Like I said, there is no such thing as invalid Markdown, just poorly formatted Markdown. And then there is the many years that users have been using Markdown (over a decade). There is a certain expectation regarding behavior that exists today. Most everyone knows and expects that `**foo**` will result in bold text. And it is not surprising if some service disallows that, but then the expectation is that you will just get `foo` back. Getting back `**foo**` would be surprising. Personally, I would assume that something other than a Markdown parser is being used. Perhaps one of the other competing lightweight markup languages. It is with these long-standing expectations of users in mind that us long-time users of Markdown say that the only way to sanitize Markdown is by sanitizing the HTML output. As a practical matter, to sanitize the Markdown text before passing it to the parser would require writing another parser, just one that removes/escapes the disallowed markup. If that is what you really want, then just use Python-Markdown extension API to remove the “strongPattern” from the parser. Now the parser won’t parse and convert `**foo**` but will leave it intact. If that is the behavior you really want, that is the easiest way to get it. But I expect your users will very much dislike it. Waylan On May 24, 2017, 1:40 PM -0400, nusenu <nus...@ri...>, wrote: > > If you need to filter input from an untrusted source, then you > > should not filter the Markdown input, but the HTML output instead. > > For a detailed explanation of why, see this article: > > https://michelf.ca/blog/2010/markdown-and-xss/ > > Thank you for the pointer, but I disagree with the main conclusion that > there is "no other choice": > > > So the conclusion is that, if you want real security, you need to > > filter Markdown’s output, not the input. **There’s no other choice.** > > but I would _like_ to be proven wrong so I can improve [1] (maybe with > an example XSS payload that bypasses [1]). > > Why do I disagree? > The blog post shows an example with a (poorly written) "XSS filter". > > The problem with "filter the HTML output not the Markdown input" is: > I'm not in the position to choose. I have to provide Markdown output not > HTML. > Also: There must be a reason for Markdown to provide escape > possibilities. [0] > > I claim that it is possible to write a filter that makes untrusted > input, to be used in Markdown output, XSS-safe. The question is > - Is there a known implementation? > - If not: How invasive does such a filter has to be. > > In my current approach [1] I simply consider whitelisted characters only > (the rest gets discarded) but I'm unhappy with that - because it is > probably **not safe** and the displayed string is no longer the one > provided by the untrusted source - so I'm looking for something better. > > "better" is: output string **looks** (after Markdown got converted to > HTML) exactly like input string _and_ is XSS-safe > > > In Python I recommend Bleach with this whitelist as a good starting > > place: https://github.com/yourcelf/bleach-whitelist > > https://github.com/mozilla/bleach > > Yes, I saw your recommendation when reading your documentation [2]. > Bleach is for HTML, I need something for Markdown. > > thanks for your help, > nusenu > > > > [0] https://daringfireball.net/projects/markdown/syntax#backslash > [2] https://pythonhosted.org/Markdown/reference.html#safe_mode > [1] > def strip_md(input): > input=cgi.escape(input) > input=re.sub(r'[\{\}\[\]()_]', ' ', input) > # "." and "-" are Markdown metachars! > whitelist=r'[0-9a-zA-Z"$%&/\',\.:;=?@\^\- ]' > input="".join(re.findall(whitelist,input)) > input=input.strip() > input=re.sub('\s+',' ', input) > return input > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Python-markdown-discuss mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss |
From: nusenu <nus...@ri...> - 2017-05-24 18:17:57
|
nusenu: > - Is there a known implementation? Since you replied to this one already I reached out to the guys at python-help. thanks, nusenu |
From: nusenu <nus...@ri...> - 2017-05-24 17:40:17
|
> If you need to filter input from an untrusted source, then you > should not filter the Markdown input, but the HTML output instead. > For a detailed explanation of why, see this article: > https://michelf.ca/blog/2010/markdown-and-xss/ Thank you for the pointer, but I disagree with the main conclusion that there is "no other choice": > So the conclusion is that, if you want real security, you need to > filter Markdown’s output, not the input. **There’s no other choice.** but I would _like_ to be proven wrong so I can improve [1] (maybe with an example XSS payload that bypasses [1]). Why do I disagree? The blog post shows an example with a (poorly written) "XSS filter". The problem with "filter the HTML output not the Markdown input" is: I'm not in the position to choose. I have to provide Markdown output not HTML. Also: There must be a reason for Markdown to provide escape possibilities. [0] I claim that it is possible to write a filter that makes untrusted input, to be used in Markdown output, XSS-safe. The question is - Is there a known implementation? - If not: How invasive does such a filter has to be. In my current approach [1] I simply consider whitelisted characters only (the rest gets discarded) but I'm unhappy with that - because it is probably **not safe** and the displayed string is no longer the one provided by the untrusted source - so I'm looking for something better. "better" is: output string **looks** (after Markdown got converted to HTML) exactly like input string _and_ is XSS-safe > In Python I recommend Bleach with this whitelist as a good starting > place: https://github.com/yourcelf/bleach-whitelist > https://github.com/mozilla/bleach Yes, I saw your recommendation when reading your documentation [2]. Bleach is for HTML, I need something for Markdown. thanks for your help, nusenu [0] https://daringfireball.net/projects/markdown/syntax#backslash [2] https://pythonhosted.org/Markdown/reference.html#safe_mode [1] def strip_md(input): input=cgi.escape(input) input=re.sub(r'[\{\}\[\]()_]', ' ', input) # "." and "-" are Markdown metachars! whitelist=r'[0-9a-zA-Z"$%&/\',\.:;=?@\^\- ]' input="".join(re.findall(whitelist,input)) input=input.strip() input=re.sub('\s+',' ', input) return input |
From: <way...@ic...> - 2017-05-24 12:25:11
|
If you need to filter input from an untrusted source, then you should not filter the Markdown input, but the HTML output instead. For a detailed explanation of why, see this article: https://michelf.ca/blog/2010/markdown-and-xss/ In Python I recommend Bleach with this whitelist as a good starting place: https://github.com/yourcelf/bleach-whitelist https://github.com/mozilla/bleach Waylan On May 24, 2017, 7:59 AM -0400, nusenu <nus...@ri...>, wrote: > > > way...@ic...: > > No, I am not aware of any such function. I've never seen on (that I > > recall) and never had a need or request for one either. > > Is no one using untrusted input in their markdown files? > |
From: nusenu <nus...@ri...> - 2017-05-24 11:59:12
|
way...@ic...: > No, I am not aware of any such function. I've never seen on (that I > recall) and never had a need or request for one either. Is no one using untrusted input in their markdown files? |
From: <way...@ic...> - 2017-05-22 16:20:51
|
No, I am not aware of any such function. I've never seen on (that I recall) and never had a need or request for one either. There is certainly no such function in Python-Markdown. Thanks, Waylan Limberg On May 22, 2017, 8:44 AM -0400, nusenu <nus...@ri...>, wrote: > > > way...@ic...: > > The backslash escape as documented on daringfireball is fully supported by default. Is there a specific input that is not working for you? > > maybe my question was not clear. > > I'll try again: > > print escape_md('**foo**') > \*\*foo\*\* > > I'm looking for _that_ "escape_md()" function. > > Is there one in Python-Markdown? Do you know one elsewhere? > > thanks, > nusenu > |
From: nusenu <nus...@ri...> - 2017-05-22 12:44:16
|
way...@ic...: > The backslash escape as documented on daringfireball is fully supported by default. Is there a specific input that is not working for you? maybe my question was not clear. I'll try again: print escape_md('**foo**') \*\*foo\*\* I'm looking for _that_ "escape_md()" function. Is there one in Python-Markdown? Do you know one elsewhere? thanks, nusenu |
From: <way...@ic...> - 2017-05-22 12:19:13
|
The backslash escape as documented on daringfireball is fully supported by default. Is there a specific input that is not working for you? Thanks, Waylan Limberg On May 22, 2017, 5:22 AM -0400, nusenu <nus...@ri...>, wrote: > Hi, > > as far as I have seen Python-Markdown does not offer an escape function > for input that should not be interpreted as Markdown. > Example: **foo** should be displayed as **foo** not <strong>foo... > > Do you know of a library that escapes input for use in Markdown? > **foo** -> \*\*foo\*\* > and all the other characters: > https://daringfireball.net/projects/markdown/syntax#backslash > + the pipe character "|" (tables). > > thanks, > nusenu > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Python-markdown-discuss mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss |
From: nusenu <nus...@ri...> - 2017-05-22 09:22:37
|
Hi, as far as I have seen Python-Markdown does not offer an escape function for input that should not be interpreted as Markdown. Example: **foo** should be displayed as **foo** not <strong>foo... Do you know of a library that escapes input for use in Markdown? **foo** -> \*\*foo\*\* and all the other characters: https://daringfireball.net/projects/markdown/syntax#backslash + the pipe character "|" (tables). thanks, nusenu |
From: <way...@ic...> - 2017-05-02 23:47:23
|
The tutorial covers the simplest parts of the API. It only gets more complex from there. However, I’m sure you can work through it. I would suggest making a simple extension. Something that is less complex that what you want. That will get you familiar with the API. Then you can build on that knowledge by building the extension you want. It may also help to consider alternative ways of designing your syntax. For example, some years ago someone asked for help in creating an extension which embedded YouTube videos. He had a special syntax that he wanted to use. I suggested that he just use regular Markdown links and alter the link parser to check for YouTube links and output different HTML. It turned out that was a much better (and more extendable) solution which is still used by various implementations today. I find your description of your input and desired output rather vague, so I can’t comment on it specifically. But if you really can’t incorporate your needs into existing Markdown syntax, then I would start with writing a regular expression which matches your desired syntax. Once you have that, then you can reference the tutorial to write an inlinePattern which pulls the data from a match against your regular expression, build an ElementTree element, and return it. Everything else is just boilerplate code and doesn’t change much between extensions. Waylan On May 1, 2017, 11:38 PM -0400, Yellow Elephant <yel...@gm...>, wrote: > Hi, I want to make a quite simple extension. I have followed the basic tutorial and looked through the API. Unfortunately that is still a bit too advanced for me, and the tutorial covered something that I didn't want to do. > > What I want to be able to do: > > 1. User input: [command] foo [/command] > 2. Output: <htlm tag that uses foo> > > //Yellephant > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Python-markdown-discuss mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss |
From: Yellow E. <yel...@gm...> - 2017-05-02 03:38:16
|
Hi, I want to make a quite simple extension. I have followed the basic tutorial and looked through the API. Unfortunately that is still a bit too advanced for me, and the tutorial covered something that I didn't want to do. What I want to be able to do: 1. User input: [command] foo [/command] 2. Output: <htlm tag that uses foo> //Yellephant |
From: Waylan L. <way...@ic...> - 2017-03-09 22:05:18
|
Kalle, I would simply subclass the `UListProcessor` class and override the regex (`UListProcessor.RE`) so that it also matched your new bullet type, and then use the new subclass as a replacement for the `UListProcessor` instance. After all, all you are doing is adding a new bullet type for unordered lists. That said, I would strongly suggest you not use the hash character (`#`) as a bullet. It already serves as a hash style header. How would you differentiate between a header nested in a list item and your new list type? For example, consider your example list: * List begins here # New list-like thing In standard Markdown, that would render correctly as: <ul> <li> <p>List begins here</p> <h1>New list-like thing</h1> </li> </ul> In my experience, it is best **not** to introduce new syntax which directly conflicts with existing syntax. Of course, if you are also removing support for hash style headers, then that may make sense. Waylan On Wed, Mar 8, 2017 at 10:47 AM, Kalle Rutanen <ka...@hi...> wrote: > Hi there, > > I have extended Python Markdown with a new block-processor which > resembles a list, say with a bullet #. I am having problems with > making > it interact well with ordinary lists. Consider the following text: > > * List begins here > > # New list-like thing begins here (1) > > This should also be in the new thing. (2) > > Currently, the parser > a) parses the list-item with UListProcessor > b) parses the child-block (1) with ListIndentProcessor > c) sends the child-block (1) to be parsed by the NewThingProcessor > d) parses the child-block (2) with ListIndentProcessor > > The problem is, NewThingProcessor never gets the opportunity to deal > with the additional content in child-block (2): the child-block (2) is > not in the set of blocks when parsing child-block (1) in c). > > Is there a way to make this work? > > Kalle > > > ------------------------------------------------------------------------------ > Announcing the Oxford Dictionaries API! The API offers world-renowned > dictionary content that is easy and intuitive to access. Sign up for > an > account today to start using our lexical data to power your apps and > projects. Get started today and enter our developer competition. > http://sdm.link/oxford > _______________________________________________ > Python-markdown-discuss mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss |
From: Kalle R. <ka...@hi...> - 2017-03-08 16:04:37
|
Hi there, I have extended Python Markdown with a new block-processor which resembles a list, say with a bullet #. I am having problems with making it interact well with ordinary lists. Consider the following text: * List begins here # New list-like thing begins here (1) This should also be in the new thing. (2) Currently, the parser a) parses the list-item with UListProcessor b) parses the child-block (1) with ListIndentProcessor c) sends the child-block (1) to be parsed by the NewThingProcessor d) parses the child-block (2) with ListIndentProcessor The problem is, NewThingProcessor never gets the opportunity to deal with the additional content in child-block (2): the child-block (2) is not in the set of blocks when parsing child-block (1) in c). Is there a way to make this work? Kalle |