From: Holger Schurig Date: Fri, 16 Apr 2010 08:21:01 +0000 (+0200) Subject: read_markdown.py: upgrade to 1.0.1.13 X-Git-Url: https://oss.titaniummirror.com/gitweb?p=webber.git;a=commitdiff_plain;h=99d76a910c5521363fce42d61dffea33735f9a4b read_markdown.py: upgrade to 1.0.1.13 --- diff --git a/plugins/read_markdown.py b/plugins/read_markdown.py index c8d4fad..1ac44bf 100644 --- a/plugins/read_markdown.py +++ b/plugins/read_markdown.py @@ -5,7 +5,7 @@ from webber import * # Copyright (c) 2007-2008 ActiveState Corp. # License: MIT (http://www.opensource.org/licenses/mit-license.php) # -# I used version 1.0.1.12, but deleted: +# I used version 1.0.1.13, but deleted: # * file-vars (emacs-style settings inside the file) # * Standardize line endings # * call to _do_links() @@ -647,7 +647,7 @@ class Markdown(object): Markdown.pl because of the lack of atomic matching support in Python's regex engine used in $g_nested_brackets. """ - MAX_LINK_TEXT_SENTINEL = 300 + MAX_LINK_TEXT_SENTINEL = 3000 # markdown2 issue 24 # `anchor_allowed_pos` is used to support img links inside # anchors, but not anchors inside anchors. An anchor's start @@ -1544,7 +1544,8 @@ def _xml_encode_email_char_at_random(ch): r = random() # Roughly 10% raw, 45% hex, 45% dec. # '@' *must* be encoded. I [John Gruber] insist. - if r > 0.9 and ch != "@": + # Issue 26: '_' must be encoded. + if r > 0.9 and ch not in "@_": return ch elif r < 0.45: # The [1:] is to drop leading '0': 0x63 -> x63