From: Waylan L. <way...@ic...> - 2015-01-25 21:11:19
|
Note that this tutorial is not the definitive documentation for the extension API. This is simply an example of how to use it. The actual documentation lives at https://pythonhosted.org/Markdown/extensions/api.html and is linked from the tutorial. I suspect that will answer most of your questions. As for where the specific inline patterns are defined, a quick read of the source code would answer that. Everything is organized in a self-explanatory way (I think - although I may be bias). So `markdown/inlinepatterns.py` would give you what you want. In fact the `build_inlinepatterns` function starts on line 59: https://github.com/waylan/Python-Markdown/blob/master/markdown/inlinepattern s.py#L59 I hope that helps. Waylan -----Original Message----- From: Dave Pawson [mailto:dav...@gm...] Sent: Sunday, January 25, 2015 5:09 AM To: PythonMD list Subject: [Python-markdown-discuss] Order of precedence, inlines? 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 ---------------------------------------------------------------------------- -- New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet _______________________________________________ Python-markdown-discuss mailing list Pyt...@li... https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss |