From 8d84c356bdf27c40a2e694a3e50f44830b8c6fd6 Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Fri, 7 Sep 2012 13:45:45 -0300 Subject: Fixed #141. Minor typo on wikilinks docs. Thanks for the report. --- docs/extensions/wikilinks.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/extensions/wikilinks.txt b/docs/extensions/wikilinks.txt index b5e2b04..5f6d20e 100644 --- a/docs/extensions/wikilinks.txt +++ b/docs/extensions/wikilinks.txt @@ -99,7 +99,7 @@ could also pass in a callable which must accept three arguments (``label``, The option is also provided to change or remove the class attribute. >>> html = markdown.markdown(text, - ... ['wikilink(base_url=myclass)'] + ... ['wikilink(html_class=myclass)'] ... ) Would cause all wikilinks to be assigned to the class `myclass`. -- cgit v1.2.3 From 13fa0847ab676ee2975403cefdb25f2d5395f4ad Mon Sep 17 00:00:00 2001 From: Dmitry Shachnev Date: Sun, 9 Sep 2012 17:24:22 +0400 Subject: setup.py: Add `long_description` attribute to `data` so that there's no text breakage on PyPI page --- setup.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/setup.py b/setup.py index 3491300..e6fbdd7 100755 --- a/setup.py +++ b/setup.py @@ -165,6 +165,27 @@ class md_build(build): sub_commands = build.sub_commands + [('build_docs', has_docs)] +long_description = \ +'''This is a Python implementation of John Gruber's Markdown_. +It is almost completely compliant with the reference implementation, +though there are a few known issues. See Features_ for information +on what exactly is supported and what is not. Additional features are +supported by the `Available Extensions`_. + +.. _Python-Markdown: http://packages.python.org/Markdown/ +.. _Markdown: http://daringfireball.net/projects/markdown/ +.. _Features: http://packages.python.org/Markdown/index.html#Features +.. _`Available Extensions`: http://packages.python.org/Markdown/extensions/index.html + +Support +======= + +You may ask for help and discuss various other issues on the +`mailing list`_ and report bugs on the `bug tracker`_. + +.. _`mailing list`: http://lists.sourceforge.net/lists/listinfo/python-markdown-discuss +.. _`bug tracker`: http://github.com/waylan/Python-Markdown/issues +''' data = dict( name = 'Markdown', @@ -172,6 +193,7 @@ data = dict( url = 'http://packages.python.org/Markdown/', download_url = 'http://pypi.python.org/packages/source/M/Markdown/Markdown-%s.tar.gz' % version, description = 'Python implementation of Markdown.', + long_description = long_description, author = 'Manfred Stienstra, Yuri takhteyev and Waylan limberg', author_email = 'markdown [at] freewisdom.org', maintainer = 'Waylan Limberg', -- cgit v1.2.3 From a3656333ea3f7b391b1b61c13e3566b4e0d81053 Mon Sep 17 00:00:00 2001 From: Dmitry Shachnev Date: Sun, 9 Sep 2012 18:26:44 +0400 Subject: Remove unneeded link --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index e6fbdd7..6551c5f 100755 --- a/setup.py +++ b/setup.py @@ -172,7 +172,6 @@ though there are a few known issues. See Features_ for information on what exactly is supported and what is not. Additional features are supported by the `Available Extensions`_. -.. _Python-Markdown: http://packages.python.org/Markdown/ .. _Markdown: http://daringfireball.net/projects/markdown/ .. _Features: http://packages.python.org/Markdown/index.html#Features .. _`Available Extensions`: http://packages.python.org/Markdown/extensions/index.html -- cgit v1.2.3 From 9c0959dd9b319819c13ffffbfa7185c8b9eba612 Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Sun, 21 Oct 2012 14:22:37 -0400 Subject: Fixed #151. Raw html matching is now case-insensitive. --- markdown/util.py | 2 +- tests/misc/div.html | 7 ++++++- tests/misc/div.txt | 6 ++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/markdown/util.py b/markdown/util.py index 13cbff2..db45a5e 100644 --- a/markdown/util.py +++ b/markdown/util.py @@ -20,7 +20,7 @@ BLOCK_LEVEL_ELEMENTS = re.compile("^(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul" "|hr|hr/|style|li|dt|dd|thead|tbody" "|tr|th|td|section|footer|header|group|figure" "|figcaption|aside|article|canvas|output" - "|progress|video)$") + "|progress|video)$", re.IGNORECASE) # Placeholders STX = u'\u0002' # Use STX ("Start of text") for start-of-placeholder ETX = u'\u0003' # Use ETX ("End of text") for end-of-placeholder diff --git a/tests/misc/div.html b/tests/misc/div.html index 7b68854..cb6a759 100644 --- a/tests/misc/div.html +++ b/tests/misc/div.html @@ -2,4 +2,9 @@ _foo_ - \ No newline at end of file + + +

And now in uppercase:

+
+foo +
\ No newline at end of file diff --git a/tests/misc/div.txt b/tests/misc/div.txt index ca87745..4ff972e 100644 --- a/tests/misc/div.txt +++ b/tests/misc/div.txt @@ -3,3 +3,9 @@ _foo_ + +And now in uppercase: + +
+foo +
-- cgit v1.2.3 From 0dc9ae0d62829a4b9856a3979c967facafc2d128 Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Sun, 21 Oct 2012 15:02:19 -0400 Subject: Fixed #152. Spaces in links are now escaped. --- markdown/inlinepatterns.py | 1 + tests/basic/angle-links-and-img.html | 2 +- tests/misc/url_spaces.html | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/markdown/inlinepatterns.py b/markdown/inlinepatterns.py index d3ef4e0..285e7e5 100644 --- a/markdown/inlinepatterns.py +++ b/markdown/inlinepatterns.py @@ -328,6 +328,7 @@ class LinkPattern(Pattern): `username:password@host:port`. """ + url = url.replace(' ', '%20') if not self.markdown.safeMode: # Return immediately bipassing parsing. return url diff --git a/tests/basic/angle-links-and-img.html b/tests/basic/angle-links-and-img.html index 1ca3b0b..255c299 100644 --- a/tests/basic/angle-links-and-img.html +++ b/tests/basic/angle-links-and-img.html @@ -1,4 +1,4 @@ -

link +

link image link image

\ No newline at end of file diff --git a/tests/misc/url_spaces.html b/tests/misc/url_spaces.html index ebacb75..f9c91b3 100644 --- a/tests/misc/url_spaces.html +++ b/tests/misc/url_spaces.html @@ -1,2 +1,2 @@ -

Dawn of War

-

Dawn of War

\ No newline at end of file +

Dawn of War

+

Dawn of War

\ No newline at end of file -- cgit v1.2.3 From 5aad55f920ded6a30a61a8a9b90a52da48c79040 Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Sun, 21 Oct 2012 16:09:09 -0400 Subject: Fixed #153. Two spaces at end of paragraph is not a linebreak. --- markdown/inlinepatterns.py | 2 -- tests/misc/html.html | 3 +-- tests/misc/two-spaces.html | 6 ++---- tests/safe_mode/inline-html-simple.html | 9 +++------ 4 files changed, 6 insertions(+), 14 deletions(-) diff --git a/markdown/inlinepatterns.py b/markdown/inlinepatterns.py index 285e7e5..6ec58c4 100644 --- a/markdown/inlinepatterns.py +++ b/markdown/inlinepatterns.py @@ -69,7 +69,6 @@ def build_inlinepatterns(md_instance, **kwargs): ReferencePattern(SHORT_REF_RE, md_instance) inlinePatterns["autolink"] = AutolinkPattern(AUTOLINK_RE, md_instance) inlinePatterns["automail"] = AutomailPattern(AUTOMAIL_RE, md_instance) - inlinePatterns["linebreak2"] = SubstituteTagPattern(LINE_BREAK_2_RE, 'br') inlinePatterns["linebreak"] = SubstituteTagPattern(LINE_BREAK_RE, 'br') if md_instance.safeMode != 'escape': inlinePatterns["html"] = HtmlPattern(HTML_RE, md_instance) @@ -119,7 +118,6 @@ AUTOMAIL_RE = r'<([^> \!]*@[^> ]*)>' # HTML_RE = r'(\<([a-zA-Z/][^\>]*?|\!--.*?--)\>)' # <...> ENTITY_RE = r'(&[\#a-zA-Z0-9]*;)' # & LINE_BREAK_RE = r' \n' # two spaces at end of line -LINE_BREAK_2_RE = r' $' # two spaces at end of text def dequote(string): diff --git a/tests/misc/html.html b/tests/misc/html.html index c72bb81..1eb6a97 100644 --- a/tests/misc/html.html +++ b/tests/misc/html.html @@ -1,7 +1,6 @@

Block level html

-

Some inline stuff.
-

+

Some inline stuff.

Now some arbitrary tags.

More block level html.
diff --git a/tests/misc/two-spaces.html b/tests/misc/two-spaces.html index 102d1db..97b54b4 100644 --- a/tests/misc/two-spaces.html +++ b/tests/misc/two-spaces.html @@ -4,14 +4,12 @@ but this line has three
and this is the second from last line in this test message