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
|