Smileyt / python-markdown2

Automatically exported from code.google.com/p/python-markdown2
Other
0 stars 0 forks source link

r80 broke test 'markdown2/phpmarkdown/email_auto_links' #5

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
r80 added the utf-8 encoding/decoding.

======================================================================
FAIL: markdown2/phpmarkdown/email_auto_links
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./test_markdown2.py", line 145, in <lambda>
    self._assertMarkdownPath(t, opts=o)
  File "./test_markdown2.py", line 77, in _assertMarkdownPath
    self._assertMarkdown(text, html, text_path, html_path, opts=opts)
  File "./test_markdown2.py", line 124, in _assertMarkdown
    errmsg.encode('ascii', 'charreprreplace'))
AssertionError: markdown2.py didn't produce the expected HTML:
  ---- text (escaping: .=space, \n=newline) ----
    <michel.fortin@michelf.com>\n
    \n
    International.domain.names:.<help@t\u016bdali\u0146.lv>
  ---- Python markdown2.py HTML (escaping: .=space, \n=newline) ----

<p><a.href="&#109;&#x61;i&#108;&#x74;&#111;&#58;&#x6d;&#x69;&#99;&#x68;&#101;&#1
08;.&#102;&#x6f;&#114;&#x74;&#x69;&#110;&#64;&#x6d;&#x69;c&#x68;&#101;&#108;&#10
2;&#46;&#99;&#x6f;&#x6d;">&#x6d;&#x69;&#99;&#x68;&#101;&#108;.&#102;&#x6f;&#114;
&#x74;&#x69;&#110;&#64;&#x6d;&#x69;c&#x68;&#101;&#108;&#102;&#46;&#99;&#x6f;&#x6
d;</a></p>\n
    \n
    <p>International.domain.names:.<help@t\u016bdali\u0146.lv></p>\n
  ---- expected HTML (escaping: .=space, \n=newline) ----

<p><a.href="&#109;&#x61;&#105;&#x6c;&#116;&#x6f;&#58;&#x6d;&#105;&#x63;&#104;&#x
65;&#108;&#x2e;&#102;&#x6f;&#114;&#x74;&#105;&#x6e;&#64;&#x6d;&#105;&#x63;&#104;
&#x65;&#108;&#x66;&#46;&#x63;&#111;&#x6d;">&#x6d;&#105;&#x63;&#104;&#x65;&#108;&
#x2e;&#102;&#x6f;&#114;&#x74;&#105;&#x6e;&#64;&#x6d;&#105;&#x63;&#104;&#x65;&#10
8;&#x66;&#46;&#x63;&#111;&#x6d;</a></p>\n
    \n

<p>International.domain.names:.<a.href="&#x6d;&#97;&#105;&#x6c;&#x74;&#111;&#58;
&#x68;&#x65;&#108;&#112;&#x40;&#x74;\u016b&#x64;&#x61;&#108;&#105;\u0146&#46;&#1
08;&#x76;">&#x68;&#x65;&#108;&#112;&#x40;&#x74;\u016b&#x64;&#x61;&#108;&#105;\u0
146&#46;&#108;&#x76;</a></p>\n
  ---- diff ----
    --- ./php-markdown-cases/Email auto links.html 
    +++ markdown2 ./php-markdown-cases/Email auto links.text 
    @@ -1,3 +1,3 @@
     <p><a
href="mailto:michel.fortin@michelf.com">michel.fortin@michelf.com</a></p>

    -<p>International domain names: <a
href="mailto:help@t\u016bdali\u0146.lv">help@t\u016bdali\u0146.lv</a></p>
    +<p>International domain names: <help@t\u016bdali\u0146.lv></p>

Original issue reported on code.google.com by tre...@gmail.com on 6 Nov 2007 at 6:40

GoogleCodeExporter commented 8 years ago
Fixed in revision 88 (better unicode handling, part of issue3).

Original comment by tre...@gmail.com on 8 Nov 2007 at 2:15