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: Dave P. <dav...@gm...> - 2015-01-25 10:09:06
|
https://github.com/waylan/Python-Markdown/wiki/Tutorial:-Writing-Extensions-for-Python-Markdown has an example "we are inserting a new inline pattern named 'del', using our pattern instance del_tag after the pattern named "not_strong" (thus the '>not_strong')." The code is md.inlinePatterns.add('del', del_tag, '>not_strong') Questions 1. Where is this order defined please? 2. I never use ___emph__ and would like to remove it, then extend to provide __ for underscore (<u>). How to find the 'key' to use for __ emphasis please to remove this markup using del md.inlinePatterns['????'] TiA -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk |
From: Waylan L. <way...@ic...> - 2014-12-24 00:09:25
|
Nerade, Sorry for the delayed response. As the info you provided is a little sparse on details, I'm not sure how much help I can provide. If I'm understanding you correctly, you are looking to create an extension or two for Python-Markdown. All of the Extension API is documented on this page: https://pythonhosted.org/Markdown/extensions/api.html However, I appears that you are unclear which parts of the API to use. Without more specifics I cant say for sure, so here are some guidelines: Most extensions use InlinePatterns (in fact it is the oldest part of the API). If you are looking to add/change any inline markup (e.g.: anything that might be within a paragraph along with other text), then this is what you want. There is a fairly new tutorial [1] on the wiki that covers InlinePatterns in more detail. If also provides a little more clear guidance in how to tell Markdown about your extensions regardless of what part of the API you are using. If you want to add block level markup (if your "gallery" is wrapped in a HTML `<div>`), then you probably what to use a BlockProcessor. Unfortunately, this part of the API is the newest and least documented. I would suggest reading the source of the Admonition [6] and Table [2] extensions for some additional guidance. I'm not sure what exactly you want to accomplish with your "outline", but the Table of Contents extension [3] may already give you what you want. Or at least it may point you in the right direction. You might also want to look at the mdx_outline [4] (a third party extension). Both of those extensions use TreeProcessors, which provide you with a ElementTree object. You can iterate through the tree and pull the info out you want in a hierarchal manner. That leaves Preprocessors and Postprocessors, which operate on the plain text before and after the parser runs and should only be used as a last resort when the other options just wont work. The Footnotes [5] extension uses both (plus an InlinePattern). While it is more complex that most, it serves as a good example of using multiple parts of the API together. The Fenced Code [7] Extension also uses a Preprocessor and then relies on the built-in HtmlStash and its corresponding postprocessor [8]. However, that severely limits its functionality (fenced code blocks cannot be nested in lists, blockquotes, etc.) and it should be rewritten as a Blockprocessor. You can also find a lot of other examples of third party extensions listed on the wiki [9]. I hope you find this helpful. If you have any more specific questions, please feel free to ask. I'll try to help where I can. [1]: https://github.com/waylan/Python-Markdown/wiki/Tutorial:-Writing-Extensions- for-Python-Markdown [2]: https://github.com/waylan/Python-Markdown/blob/master/markdown/extensions/ta bles.py [3]: https://github.com/waylan/Python-Markdown/blob/master/markdown/extensions/to c.py [4]: https://github.com/aleray/mdx_outline [5]: https://github.com/waylan/Python-Markdown/blob/master/markdown/extensions/fo otnotes.py [6]: https://github.com/waylan/Python-Markdown/blob/master/markdown/extensions/ad monition.py [7]: https://github.com/waylan/Python-Markdown/blob/master/markdown/extensions/fe nced_code.py [8]: https://github.com/waylan/Python-Markdown/blob/master/markdown/postprocessor s.py#L48 [9]: https://github.com/waylan/Python-Markdown/wiki/Third-Party-Extensions Waylan -----Original Message----- From: Marcel Pörner [mailto:me...@ne...] Sent: Monday, December 22, 2014 12:14 PM To: pyt...@li... Subject: [Python-markdown-discuss] Clarification on different types of parser/pattern Hello, for the last few days I was looking for documentation for python markdown and explanation for the different mechanisms of markdown parser. Unfortunately the information on pyhtonhosted.org was not helpful for me. In fact I am trying to use markdown for an app in which the user should be able to markup a text. This text should contain an additional tag for an image gallery like object. I want to transform it into proper html output. Furthermore I was trying to make an outline of the headline in the text input. Until now I haven't understood which "parts" of markdown I have to extend and how. Thank you in advance for your help and best regards Nerade ---------------------------------------------------------------------------- -- Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net _______________________________________________ Python-markdown-discuss mailing list Pyt...@li... https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss |
From: Marcel P. <me...@ne...> - 2014-12-22 17:41:18
|
Hello, for the last few days I was looking for documentation for python markdown and explanation for the different mechanisms of markdown parser. Unfortunately the information on pyhtonhosted.org was not helpful for me. In fact I am trying to use markdown for an app in which the user should be able to markup a text. This text should contain an additional tag for an image gallery like object. I want to transform it into proper html output. Furthermore I was trying to make an outline of the headline in the text input. Until now I haven't understood which "parts" of markdown I have to extend and how. Thank you in advance for your help and best regards Nerade |
From: Dave P. <dav...@gm...> - 2014-11-20 07:49:33
|
Thanks for that, no hadn't realised. I'm on Fedora / Linux. I'll try it, regards On 20 November 2014 02:39, Waylan Limberg <way...@ic...> wrote: > Dave, > > In case you haven't followed the ticket, this has been fixed and a new > bugfix release (2.5.2) was just issued: > > https://pypi.python.org/pypi/Markdown/2.5.2 > > All recursion in the offending code has been removed so it should work with > your long document now. I agree that 28000 entries in a TOC would be a > little overwhelming (but less so than trying to find a given part of the > document without a TOC). Perhaps using JavaScript to expand/collapse the TOC > tree would make the long TOC more manageable. Just a suggestion (I don't > know if that's even practical in your use-case or environment). > > I'd like to hear if the fix works for you either way. Markdown should never > crash because of unexpected user input. If your long document is still > causing a crash, I'd like to know about it (its rare to get feedback with > such a long document). > > Waylan Limberg > > > On Nov 17, 2014, at 02:58 AM, Dave Pawson <dav...@gm...> wrote: > > On 17 November 2014 01:58, Waylan Limberg <way...@ic...> wrote: >> Dave, >> >> I'm glad you were able to make that work for you. For the record, I've >> created a bug report for this here: >> https://github.com/waylan/Python-Markdown/issues/366 > > Thanks. From memory there were 28000 entries, set to ## or ### > for the toc to process. I had to cut it into 7 parts, to roughly 4000 > entries is about the max depth? > > Seems recursion is the right idea, just that it needs to be clean tail > recursion. > > Thanks. DaveP > > > > >> >> Waylan >> >> -----Original Message----- >> From: Dave Pawson [mailto:dav...@gm...] >> Sent: Sunday, November 16, 2014 9:03 AM >> To: Waylan Limberg >> Cc: PythonMD list >> Subject: Re: [Python-markdown-discuss] recursion error? >> >> Yes, that worked. 25K lines, no toc, builds the html. >> I can work with that. >> >> Thanks. Dave P >> >> On 16 November 2014 13:34, Waylan Limberg <way...@ic...> >> wrote: >>> The error seems pretty self-explanatory to me. You are getting a >>> recursion >> error in the `build_correct` method of the TOC Extension. A quick look at >> the source indicates that that method recursively calls itself to turn a >> flat list of headers (h1-6) taken from the document and rearranges them >> into >> a properly nested list to use as the Table of Contents. >>> >>> The short answer would be to not use that extension with such a long >> document. But, the correct answer I suppose would be to refactor the >> `build_correct` method to not be recursive - which may be easier said that >> done. >>> >>> Waylan Limberg >>> >>>> On Nov 16, 2014, at 7:11 AM, Dave Pawson <dav...@gm...> wrote: >>>> >>>> 20K line file, >>>> >>>> final error reported is >>>> File "/usr/lib/python2.7/site-packages/markdown/extensions/toc.py", >>>> line 54, in build_correct >>>> if current['level'] > prev_element['level']: >>>> RuntimeError: maximum recursion depth exceeded in cmp >>>> >>>> >>>> Any idea what I should be chasing please, in the md file? >>>> >>>> regards >>>> -- >>>> Dave Pawson >>>> XSLT XSL-FO FAQ. >>>> Docbook FAQ. >>>> http://www.dpawson.co.uk >>>> >>>> --------------------------------------------------------------------- >>>> --------- Comprehensive Server Monitoring with Site24x7. >>>> Monitor 10 servers for $9/Month. >>>> Get alerted through email, SMS, voice calls or mobile push >>>> notifications. >>>> Take corrective actions from your mobile device. >>>> http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg >>>> .clktrk _______________________________________________ >>>> 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 >> >> >> ---------------------------------------------------------------------------- >> -- >> Comprehensive Server Monitoring with Site24x7. >> Monitor 10 servers for $9/Month. >> Get alerted through email, SMS, voice calls or mobile push notifications. >> Take corrective actions from your mobile device. >> >> http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk >> _______________________________________________ >> 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 > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > _______________________________________________ > 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: Waylan L. <way...@ic...> - 2014-11-20 02:40:08
|
Dave, In case you haven't followed the ticket, this has been fixed and a new bugfix release (2.5.2) was just issued: https://pypi.python.org/pypi/Markdown/2.5.2 All recursion in the offending code has been removed so it should work with your long document now. I agree that 28000 entries in a TOC would be a little overwhelming (but less so than trying to find a given part of the document without a TOC). Perhaps using JavaScript to expand/collapse the TOC tree would make the long TOC more manageable. Just a suggestion (I don't know if that's even practical in your use-case or environment). I'd like to hear if the fix works for you either way. Markdown should never crash because of unexpected user input. If your long document is still causing a crash, I'd like to know about it (its rare to get feedback with such a long document). Waylan Limberg On Nov 17, 2014, at 02:58 AM, Dave Pawson <dav...@gm...> wrote: On 17 November 2014 01:58, Waylan Limberg <way...@ic...> wrote: > Dave, > > I'm glad you were able to make that work for you. For the record, I've > created a bug report for this here: > https://github.com/waylan/Python-Markdown/issues/366 Thanks. From memory there were 28000 entries, set to ## or ### for the toc to process. I had to cut it into 7 parts, to roughly 4000 entries is about the max depth? Seems recursion is the right idea, just that it needs to be clean tail recursion. Thanks. DaveP > > Waylan > > -----Original Message----- > From: Dave Pawson [mailto:dav...@gm...] > Sent: Sunday, November 16, 2014 9:03 AM > To: Waylan Limberg > Cc: PythonMD list > Subject: Re: [Python-markdown-discuss] recursion error? > > Yes, that worked. 25K lines, no toc, builds the html. > I can work with that. > > Thanks. Dave P > > On 16 November 2014 13:34, Waylan Limberg <way...@ic...> wrote: >> The error seems pretty self-explanatory to me. You are getting a recursion > error in the `build_correct` method of the TOC Extension. A quick look at > the source indicates that that method recursively calls itself to turn a > flat list of headers (h1-6) taken from the document and rearranges them into > a properly nested list to use as the Table of Contents. >> >> The short answer would be to not use that extension with such a long > document. But, the correct answer I suppose would be to refactor the > `build_correct` method to not be recursive - which may be easier said that > done. >> >> Waylan Limberg >> >>> On Nov 16, 2014, at 7:11 AM, Dave Pawson <dav...@gm...> wrote: >>> >>> 20K line file, >>> >>> final error reported is >>> File "/usr/lib/python2.7/site-packages/markdown/extensions/toc.py", >>> line 54, in build_correct >>> if current['level'] > prev_element['level']: >>> RuntimeError: maximum recursion depth exceeded in cmp >>> >>> >>> Any idea what I should be chasing please, in the md file? >>> >>> regards >>> -- >>> Dave Pawson >>> XSLT XSL-FO FAQ. >>> Docbook FAQ. >>> http://www.dpawson.co.uk >>> >>> --------------------------------------------------------------------- >>> --------- Comprehensive Server Monitoring with Site24x7. >>> Monitor 10 servers for $9/Month. >>> Get alerted through email, SMS, voice calls or mobile push notifications. >>> Take corrective actions from your mobile device. >>> http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg >>> .clktrk _______________________________________________ >>> 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 > > ---------------------------------------------------------------------------- > -- > Comprehensive Server Monitoring with Site24x7. > Monitor 10 servers for $9/Month. > Get alerted through email, SMS, voice calls or mobile push notifications. > Take corrective actions from your mobile device. > http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk > _______________________________________________ > 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 ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk _______________________________________________ Python-markdown-discuss mailing list Pyt...@li... https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss |
From: Dave P. <dav...@gm...> - 2014-11-17 13:42:15
|
Thinking more practically. A TOC of 28000 entries is rather silly and quite impractical. Perhaps more useful would be a parameter to request TOC at level n only, e.g. (my case) h2/## entries. Reduction in processing and less pain for the reader. regards On 17 November 2014 01:58, Waylan Limberg <way...@ic...> wrote: > Dave, > > I'm glad you were able to make that work for you. For the record, I've > created a bug report for this here: > https://github.com/waylan/Python-Markdown/issues/366 > > Waylan > > -----Original Message----- > From: Dave Pawson [mailto:dav...@gm...] > Sent: Sunday, November 16, 2014 9:03 AM > To: Waylan Limberg > Cc: PythonMD list > Subject: Re: [Python-markdown-discuss] recursion error? > > Yes, that worked. 25K lines, no toc, builds the html. > I can work with that. > > Thanks. Dave P > > On 16 November 2014 13:34, Waylan Limberg <way...@ic...> wrote: >> The error seems pretty self-explanatory to me. You are getting a recursion > error in the `build_correct` method of the TOC Extension. A quick look at > the source indicates that that method recursively calls itself to turn a > flat list of headers (h1-6) taken from the document and rearranges them into > a properly nested list to use as the Table of Contents. >> >> The short answer would be to not use that extension with such a long > document. But, the correct answer I suppose would be to refactor the > `build_correct` method to not be recursive - which may be easier said that > done. >> >> Waylan Limberg >> >>> On Nov 16, 2014, at 7:11 AM, Dave Pawson <dav...@gm...> wrote: >>> >>> 20K line file, >>> >>> final error reported is >>> File "/usr/lib/python2.7/site-packages/markdown/extensions/toc.py", >>> line 54, in build_correct >>> if current['level'] > prev_element['level']: >>> RuntimeError: maximum recursion depth exceeded in cmp >>> >>> >>> Any idea what I should be chasing please, in the md file? >>> >>> regards >>> -- >>> Dave Pawson >>> XSLT XSL-FO FAQ. >>> Docbook FAQ. >>> http://www.dpawson.co.uk >>> >>> --------------------------------------------------------------------- >>> --------- Comprehensive Server Monitoring with Site24x7. >>> Monitor 10 servers for $9/Month. >>> Get alerted through email, SMS, voice calls or mobile push notifications. >>> Take corrective actions from your mobile device. >>> http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg >>> .clktrk _______________________________________________ >>> 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 > > ---------------------------------------------------------------------------- > -- > Comprehensive Server Monitoring with Site24x7. > Monitor 10 servers for $9/Month. > Get alerted through email, SMS, voice calls or mobile push notifications. > Take corrective actions from your mobile device. > http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk > _______________________________________________ > 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...> - 2014-11-17 07:57:58
|
On 17 November 2014 01:58, Waylan Limberg <way...@ic...> wrote: > Dave, > > I'm glad you were able to make that work for you. For the record, I've > created a bug report for this here: > https://github.com/waylan/Python-Markdown/issues/366 Thanks. From memory there were 28000 entries, set to ## or ### for the toc to process. I had to cut it into 7 parts, to roughly 4000 entries is about the max depth? Seems recursion is the right idea, just that it needs to be clean tail recursion. Thanks. DaveP > > Waylan > > -----Original Message----- > From: Dave Pawson [mailto:dav...@gm...] > Sent: Sunday, November 16, 2014 9:03 AM > To: Waylan Limberg > Cc: PythonMD list > Subject: Re: [Python-markdown-discuss] recursion error? > > Yes, that worked. 25K lines, no toc, builds the html. > I can work with that. > > Thanks. Dave P > > On 16 November 2014 13:34, Waylan Limberg <way...@ic...> wrote: >> The error seems pretty self-explanatory to me. You are getting a recursion > error in the `build_correct` method of the TOC Extension. A quick look at > the source indicates that that method recursively calls itself to turn a > flat list of headers (h1-6) taken from the document and rearranges them into > a properly nested list to use as the Table of Contents. >> >> The short answer would be to not use that extension with such a long > document. But, the correct answer I suppose would be to refactor the > `build_correct` method to not be recursive - which may be easier said that > done. >> >> Waylan Limberg >> >>> On Nov 16, 2014, at 7:11 AM, Dave Pawson <dav...@gm...> wrote: >>> >>> 20K line file, >>> >>> final error reported is >>> File "/usr/lib/python2.7/site-packages/markdown/extensions/toc.py", >>> line 54, in build_correct >>> if current['level'] > prev_element['level']: >>> RuntimeError: maximum recursion depth exceeded in cmp >>> >>> >>> Any idea what I should be chasing please, in the md file? >>> >>> regards >>> -- >>> Dave Pawson >>> XSLT XSL-FO FAQ. >>> Docbook FAQ. >>> http://www.dpawson.co.uk >>> >>> --------------------------------------------------------------------- >>> --------- Comprehensive Server Monitoring with Site24x7. >>> Monitor 10 servers for $9/Month. >>> Get alerted through email, SMS, voice calls or mobile push notifications. >>> Take corrective actions from your mobile device. >>> http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg >>> .clktrk _______________________________________________ >>> 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 > > ---------------------------------------------------------------------------- > -- > Comprehensive Server Monitoring with Site24x7. > Monitor 10 servers for $9/Month. > Get alerted through email, SMS, voice calls or mobile push notifications. > Take corrective actions from your mobile device. > http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk > _______________________________________________ > 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: Waylan L. <way...@ic...> - 2014-11-17 01:58:45
|
Dave, I'm glad you were able to make that work for you. For the record, I've created a bug report for this here: https://github.com/waylan/Python-Markdown/issues/366 Waylan -----Original Message----- From: Dave Pawson [mailto:dav...@gm...] Sent: Sunday, November 16, 2014 9:03 AM To: Waylan Limberg Cc: PythonMD list Subject: Re: [Python-markdown-discuss] recursion error? Yes, that worked. 25K lines, no toc, builds the html. I can work with that. Thanks. Dave P On 16 November 2014 13:34, Waylan Limberg <way...@ic...> wrote: > The error seems pretty self-explanatory to me. You are getting a recursion error in the `build_correct` method of the TOC Extension. A quick look at the source indicates that that method recursively calls itself to turn a flat list of headers (h1-6) taken from the document and rearranges them into a properly nested list to use as the Table of Contents. > > The short answer would be to not use that extension with such a long document. But, the correct answer I suppose would be to refactor the `build_correct` method to not be recursive - which may be easier said that done. > > Waylan Limberg > >> On Nov 16, 2014, at 7:11 AM, Dave Pawson <dav...@gm...> wrote: >> >> 20K line file, >> >> final error reported is >> File "/usr/lib/python2.7/site-packages/markdown/extensions/toc.py", >> line 54, in build_correct >> if current['level'] > prev_element['level']: >> RuntimeError: maximum recursion depth exceeded in cmp >> >> >> Any idea what I should be chasing please, in the md file? >> >> regards >> -- >> Dave Pawson >> XSLT XSL-FO FAQ. >> Docbook FAQ. >> http://www.dpawson.co.uk >> >> --------------------------------------------------------------------- >> --------- Comprehensive Server Monitoring with Site24x7. >> Monitor 10 servers for $9/Month. >> Get alerted through email, SMS, voice calls or mobile push notifications. >> Take corrective actions from your mobile device. >> http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg >> .clktrk _______________________________________________ >> 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 ---------------------------------------------------------------------------- -- Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk _______________________________________________ Python-markdown-discuss mailing list Pyt...@li... https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss |
From: Dave P. <dav...@gm...> - 2014-11-16 14:03:22
|
Yes, that worked. 25K lines, no toc, builds the html. I can work with that. Thanks. Dave P On 16 November 2014 13:34, Waylan Limberg <way...@ic...> wrote: > The error seems pretty self-explanatory to me. You are getting a recursion error in the `build_correct` method of the TOC Extension. A quick look at the source indicates that that method recursively calls itself to turn a flat list of headers (h1-6) taken from the document and rearranges them into a properly nested list to use as the Table of Contents. > > The short answer would be to not use that extension with such a long document. But, the correct answer I suppose would be to refactor the `build_correct` method to not be recursive - which may be easier said that done. > > Waylan Limberg > >> On Nov 16, 2014, at 7:11 AM, Dave Pawson <dav...@gm...> wrote: >> >> 20K line file, >> >> final error reported is >> File "/usr/lib/python2.7/site-packages/markdown/extensions/toc.py", >> line 54, in build_correct >> if current['level'] > prev_element['level']: >> RuntimeError: maximum recursion depth exceeded in cmp >> >> >> Any idea what I should be chasing please, in the md file? >> >> regards >> -- >> Dave Pawson >> XSLT XSL-FO FAQ. >> Docbook FAQ. >> http://www.dpawson.co.uk >> >> ------------------------------------------------------------------------------ >> Comprehensive Server Monitoring with Site24x7. >> Monitor 10 servers for $9/Month. >> Get alerted through email, SMS, voice calls or mobile push notifications. >> Take corrective actions from your mobile device. >> http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk >> _______________________________________________ >> 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: Waylan L. <way...@ic...> - 2014-11-16 13:34:34
|
The error seems pretty self-explanatory to me. You are getting a recursion error in the `build_correct` method of the TOC Extension. A quick look at the source indicates that that method recursively calls itself to turn a flat list of headers (h1-6) taken from the document and rearranges them into a properly nested list to use as the Table of Contents. The short answer would be to not use that extension with such a long document. But, the correct answer I suppose would be to refactor the `build_correct` method to not be recursive - which may be easier said that done. Waylan Limberg > On Nov 16, 2014, at 7:11 AM, Dave Pawson <dav...@gm...> wrote: > > 20K line file, > > final error reported is > File "/usr/lib/python2.7/site-packages/markdown/extensions/toc.py", > line 54, in build_correct > if current['level'] > prev_element['level']: > RuntimeError: maximum recursion depth exceeded in cmp > > > Any idea what I should be chasing please, in the md file? > > regards > -- > Dave Pawson > XSLT XSL-FO FAQ. > Docbook FAQ. > http://www.dpawson.co.uk > > ------------------------------------------------------------------------------ > Comprehensive Server Monitoring with Site24x7. > Monitor 10 servers for $9/Month. > Get alerted through email, SMS, voice calls or mobile push notifications. > Take corrective actions from your mobile device. > http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk > _______________________________________________ > Python-markdown-discuss mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss |
From: Dave P. <dav...@gm...> - 2014-11-16 12:11:08
|
20K line file, final error reported is File "/usr/lib/python2.7/site-packages/markdown/extensions/toc.py", line 54, in build_correct if current['level'] > prev_element['level']: RuntimeError: maximum recursion depth exceeded in cmp Any idea what I should be chasing please, in the md file? regards -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk |
From: Waylan L. <way...@ic...> - 2014-10-17 23:30:15
|
Jan, Have you read the [Integrating Your Code Into Markdown][1] section of the Extension API docs? That should tell you everything you need " to actually get Markdown to recognize" your code. You may also find this [tutorial][2] helpful. Although it may be a little out of date, the basic concepts still apply. Unfortunately, without seeing your code, there is not much more help I can provide. [1]: https://pythonhosted.org/Markdown/extensions/api.html#integrating_into_markd own [2]: http://achinghead.com/python-markdown-adding-insert-delete.html Waylan -----Original Message----- From: Jan Erik Moström [mailto:li...@mo...] Sent: Friday, October 17, 2014 11:19 AM To: pyt...@li... Subject: [Python-markdown-discuss] Adding a new tag - completely confused I'm trying to make a few additions to the markdown syntax to be able to do a few things I like to do but I'm completely confused of how to get it to work. An example: I want to be able to use an image tag like @ and get something like <figure><img src="http://stuff.com/imgcode/blabla.jpg" alt="Hello"><figcaption>Hello</figcaption></figure> >From what I understand this should be handled as an inlinepattern and if I look in the source it's basically the ImagePattern that I need to copy and make a few changes to. So I did that and made a few cosmetic changes to test that I got things working ... but I have no idea how to actually get Markdown to recognise my code. I looked at a few extensions, read the docs but I still don't get how I can use it. What I've done is simply to copy the image pattern and the ImagePattern class and changed the pattern to MYIMAGE_LINK_RE = r'@\!' + BRK + r'\s*\((<.*?>|([^")]+"[^"]*"|[^\)]*))\)' and ImagePattern to output "srct" instead of "src". But how do I get it to work? ---------------------------------------------------------------------------- -- Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://p.sf.net/sfu/Zoho _______________________________________________ Python-markdown-discuss mailing list Pyt...@li... https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss |
From: Jan E. M. <li...@mo...> - 2014-10-17 15:39:37
|
I'm trying to make a few additions to the markdown syntax to be able to do a few things I like to do but I'm completely confused of how to get it to work. An example: I want to be able to use an image tag like @ and get something like <figure><img src="http://stuff.com/imgcode/blabla.jpg" alt="Hello"><figcaption>Hello</figcaption></figure> >From what I understand this should be handled as an inlinepattern and if I look in the source it's basically the ImagePattern that I need to copy and make a few changes to. So I did that and made a few cosmetic changes to test that I got things working ... but I have no idea how to actually get Markdown to recognise my code. I looked at a few extensions, read the docs but I still don't get how I can use it. What I've done is simply to copy the image pattern and the ImagePattern class and changed the pattern to MYIMAGE_LINK_RE = r'@\!' + BRK + r'\s*\((<.*?>|([^")]+"[^"]*"|[^\)]*))\)' and ImagePattern to output "srct" instead of "src". But how do I get it to work? |
From: Waylan L. <way...@ic...> - 2014-10-05 02:45:08
|
Jamie, You haven't provided enough info for me to say for certain, but I would guess that at least one of the third party extensions needs to be updated to take advantage of the new additions to the extension API. Btw, there are a couple adjustments you might want to make to your code: 1) Use keyword arguments: `extensions=[...]` 2) Use full paths to the extensions using Python dot syntax: 'markdown.extensions.extra' instead of 'extra' ... Or better yet, import the extension class and pass in an instance (which would also alleviate your reported problem). See the Release notes for details: https://pythonhosted.org/Markdown/release-2.5.html Note that your current code is pending depreciation and will no longer work in a couple more releases. Regarding 2) above, the recommended way is to import the class. See the docs for details: https://pythonhosted.org/Markdown/reference.html#extensions Waylan Limberg > On Oct 4, 2014, at 5:40 PM, Jamie McGowan <jam...@gm...> wrote: > > Hi there, > > I use python-markdown in an app I made. A number of users have reported issues that seem to have been caused by the latest update to python-markdown. > > This is the error message: > File "/usr/lib/python3.4/site-packages/markdown/extensions/__init__.py", line 75, in setConfigs > for key, value in items: > TypeError: 'NoneType' object is not iterable > > I include the extensions like so: > > markdown.markdown(text, ['extra', 'nl2br', 'urlize', 'Highlighting', 'Strikethrough', 'markdown_checklist', 'superscript', 'subscript']) > > Commenting out lines 25-44 of "markdown/extensions/__init__.py" seems to fix the issue (as a temporary fix). > > Any ideas to what I am doing wrong or how should I fix it. > > Thanks for your help, > Jamie > > > ------------------------------------------------------------------------------ > Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer > Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports > Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper > Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer > http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk > _______________________________________________ > Python-markdown-discuss mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss |
From: Jamie M. <jam...@gm...> - 2014-10-04 21:40:35
|
Hi there, I use python-markdown in an app I made. A number of users have reported issues that seem to have been caused by the latest update to python-markdown. This is the error message: File "/usr/lib/python3.4/site-packages/markdown/extensions/__init__.py", line 75, in setConfigs for key, value in items: TypeError: 'NoneType' object is not iterable I include the extensions like so: markdown.markdown(text, ['extra', 'nl2br', 'urlize', 'Highlighting', 'Strikethrough', 'markdown_checklist', 'superscript', 'subscript']) Commenting out lines 25-44 of "markdown/extensions/__init__.py" seems to fix the issue (as a temporary fix). Any ideas to what I am doing wrong or how should I fix it. Thanks for your help, Jamie |
From: Dmitry S. <mi...@gm...> - 2014-09-17 09:34:04
|
Hi, On Wed, Sep 17, 2014 at 12:00 AM, Guy Rutenberg <guy...@gm...> wrote: > I want to use python-markdown together with MathJax (similar to the way > equations are implemented in StackExchange sites). In order to do so, I need > to make the parser keep everything between $ (dollar) signs as is, ignoring > backspaces and other special characters. > > Is there a simple way to do it? In PyMarkups there is some code that works with MathJax: https://github.com/mitya57/pymarkups/blob/master/markups/markdown.py#L90 https://github.com/mitya57/pymarkups/blob/master/markups/markdown.py#L148 You can reuse or copy that code. Unlike the mathjax extension listed on the wiki page, my code converts $...$ blocks to an actual <script> element itself, instead of relying on MathJax's tex2jax extension to do that. This is a more safe way (i.e. supports escaping), and it also supports other delimiters (like \[...\], \(...\) and \begin{}...\end{}). -- Dmitry Shachnev |
From: Waylan L. <way...@ic...> - 2014-09-16 23:29:55
|
Guy, There are a few different approaches you could take. First, did you check that an extension doesn’t already exist that meets your needs? See the wiki: https://github.com/waylan/Python-Markdown/wiki/Third-Party-Extensions Or could you put your equations in `code spans`? If not, you could easily create your own extension using our extension API: https://pythonhosted.org/Markdown/extensions/api.html I expect you would be creating an inlinePattern. I would look at the `BacktickPattern` (which processes inline code) for guidance: https://github.com/waylan/Python-Markdown/blob/master/markdown/inlinepatterns.py#L256 The `BacktickPattern` just uses an `AtomicString` to tell markdown not to process the string any further. However, note that the entire string must be an Atomic string. So if your equation in imbedded in the middle of a paragraph with other markdown syntax, you would need to wrap your string in a tag (perhaps `<span>`) to preserve the AtomicString and allow the rest of the paragraph to be parsed as Markdown text. The following tutorials might be a gentler introduction to creating your own extensions: http://achinghead.com/python-markdown-adding-insert-delete.html http://achinghead.com/python-markdown-changing-bold-italics.html Hope that helps. Waylan From: Guy Rutenberg [mailto:guy...@gm...] Sent: Tuesday, September 16, 2014 4:01 PM To: pyt...@li... Subject: [Python-markdown-discuss] Treating anything between $ signs as raw text Hi, I want to use python-markdown together with MathJax (similar to the way equations are implemented in StackExchange sites). In order to do so, I need to make the parser keep everything between $ (dollar) signs as is, ignoring backspaces and other special characters. Is there a simple way to do it? Thanks, Guy ---- http://www.guyrutenberg.com |
From: Guy R. <guy...@gm...> - 2014-09-16 20:01:11
|
Hi, I want to use python-markdown together with MathJax (similar to the way equations are implemented in StackExchange sites). In order to do so, I need to make the parser keep everything between $ (dollar) signs as is, ignoring backspaces and other special characters. Is there a simple way to do it? Thanks, Guy ---- http://www.guyrutenberg.com |
From: Dave P. <dav...@gm...> - 2014-09-09 16:10:34
|
On 9 September 2014 13:28, Waylan Limberg <way...@ic...> wrote: > Consider the [sane lists] extension. The correct behavior in true Markdown is so illogical to so many people that we created an extension that offers a different behavior. That said, this extension does not -- and will not -- ever adopt your suggestion. As I said, "Extra blank lines (more than one) have no implied meaning". According to Gruber. He has a lot to answer for. sane lists it is then. Just select the option and they take precedence, is that it please? regards -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk |
From: Waylan L. <way...@ic...> - 2014-09-09 12:28:59
|
Oh, I never said it was logical. But is is not considered a bug. When I said "Extra blank lines (more than one) have no implied meaning" I really meant it. This is a consistent concept throughout Markdown that any expert knows and understands. I, like you, may not agree with the decision made by Markdown's creator, but if I changed the behavior, then it wouldn't be Markdown any more. In fact some people recently tried to make an implementation that made this (among a few other) changes, and they were very clearly informed that what they created could not be called Markdown. Consider the [sane lists] extension. The correct behavior in true Markdown is so illogical to so many people that we created an extension that offers a different behavior. That said, this extension does not -- and will not -- ever adopt your suggestion. As I said, "Extra blank lines (more than one) have no implied meaning". Waylan Limberg [sane lists]: https://pythonhosted.org/Markdown/extensions/sane_lists.html > On Sep 9, 2014, at 2:32 AM, Dave Pawson <dav...@gm...> wrote: > >> On 9 September 2014 02:30, Waylan Limberg <way...@ic...> wrote: >> This is definitely not a bug. For some reason newcomers to markdown always >> try to add extra blank lines to break a list/codeblock/blockquote into two >> separate blocks. There is simply nothing in the syntax [rules] to support >> that however. And in fact, the original implementation (markdown.pl) does >> not support such a concept. This is simply a fact of how Markdown works. > > So the intention is to copy markdown.pl, bugs and all? > > >> Extra blank lines (more than one) have no implied meaning Once you get used >> to the idea it becomes easy enough to work with. > > a problem to address with a kludge? > >> >> Some people have been known to use HTML comments to get around this. >> Remember raw HTML is passed through as is. And an HTML comment does not get >> displayed in the browser. If you want to break one list into two with >> nothing between, insert a raw HTML comment between them. > > One kludge. > >> >> And as you seem to be confused about why the `<p>` tags are introduced, >> reread the section of the rules on [lists]. Particularly the part that >> starts with this line: >> >>> If list items are separated by blank lines, Markdown will wrap the items >> in `<p>` tags in the HTML output. > > Which to me seems quite illogical. > > > regards > > > -- > Dave Pawson > XSLT XSL-FO FAQ. > Docbook FAQ. > http://www.dpawson.co.uk |
From: Dave P. <dav...@gm...> - 2014-09-09 06:32:35
|
On 9 September 2014 02:30, Waylan Limberg <way...@ic...> wrote: > This is definitely not a bug. For some reason newcomers to markdown always > try to add extra blank lines to break a list/codeblock/blockquote into two > separate blocks. There is simply nothing in the syntax [rules] to support > that however. And in fact, the original implementation (markdown.pl) does > not support such a concept. This is simply a fact of how Markdown works. So the intention is to copy markdown.pl, bugs and all? > Extra blank lines (more than one) have no implied meaning Once you get used > to the idea it becomes easy enough to work with. a problem to address with a kludge? > > Some people have been known to use HTML comments to get around this. > Remember raw HTML is passed through as is. And an HTML comment does not get > displayed in the browser. If you want to break one list into two with > nothing between, insert a raw HTML comment between them. One kludge. > > And as you seem to be confused about why the `<p>` tags are introduced, > reread the section of the rules on [lists]. Particularly the part that > starts with this line: > >> If list items are separated by blank lines, Markdown will wrap the items > in `<p>` tags in the HTML output. Which to me seems quite illogical. regards -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk |
From: Waylan L. <way...@ic...> - 2014-09-09 01:30:31
|
This is definitely not a bug. For some reason newcomers to markdown always try to add extra blank lines to break a list/codeblock/blockquote into two separate blocks. There is simply nothing in the syntax [rules] to support that however. And in fact, the original implementation (markdown.pl) does not support such a concept. This is simply a fact of how Markdown works. Extra blank lines (more than one) have no implied meaning Once you get used to the idea it becomes easy enough to work with. Some people have been known to use HTML comments to get around this. Remember raw HTML is passed through as is. And an HTML comment does not get displayed in the browser. If you want to break one list into two with nothing between, insert a raw HTML comment between them. And as you seem to be confused about why the `<p>` tags are introduced, reread the section of the rules on [lists]. Particularly the part that starts with this line: > If list items are separated by blank lines, Markdown will wrap the items in `<p>` tags in the HTML output. [rules]: http://daringfireball.net/projects/markdown/syntax [lists]: http://daringfireball.net/projects/markdown/syntax#list Waylan Limberg -----Original Message----- From: Dave Pawson [mailto:dav...@gm...] Sent: Monday, September 08, 2014 9:20 AM To: PythonMD list Subject: [Python-markdown-discuss] nested list termination Given input * a *a1 * a *b *b1 I.e. two lists, each having nested children, the output needs 'something' (a para or hr etc) between the two lists, or the html output appears to put p elements inside the 'outer' li elements. Is this just my processing chain or a know 'feature' please? Dave -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk ---------------------------------------------------------------------------- -- Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk _______________________________________________ Python-markdown-discuss mailing list Pyt...@li... https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss |
From: Dave P. <dav...@gm...> - 2014-09-08 13:20:33
|
Given input * a *a1 * a *b *b1 I.e. two lists, each having nested children, the output needs 'something' (a para or hr etc) between the two lists, or the html output appears to put p elements inside the 'outer' li elements. Is this just my processing chain or a know 'feature' please? Dave -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk |
From: Dave P. <dav...@gm...> - 2014-09-04 15:13:08
|
http://standardmarkdown.com/ I first heard of it today. regards -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk |
From: Dmitry S. <mi...@gm...> - 2014-08-26 15:11:27
|
Hi, On Tue, Aug 26, 2014 at 4:52 AM, Waylan Limberg <way...@ic...> wrote: > Also, I posted a third proposal. So we have… > > Should we drop support for "extname(config=option)"?: > https://github.com/waylan/Python-Markdown/issues/335 > > Should we deprecate mdx_* extension names?: > https://github.com/waylan/Python-Markdown/issues/336 > > Should we deprecate "safe_mode"?: > https://github.com/waylan/Python-Markdown/issues/337 I am fine with all three proposals. Though, for the first two, I will need to add some code to my [PyMarkups] wrapper to allow its users to continue to use markdown-extensions.txt file. [PyMarkups]: http://pythonhosted.org/Markups/ -- Dmitry Shachnev |