File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,7 +26,3 @@ def test_glyphs():
2626 result = t .glyphs ("<p><cite>Cat's Cradle</cite> by Vonnegut</p>" )
2727 expect = '<p><cite>Cat’s Cradle</cite> by Vonnegut</p>'
2828 assert result == expect
29-
30- result = t .glyphs ('test"' )
31- expect = 'test” '
32- assert result == expect
Original file line number Diff line number Diff line change @@ -59,3 +59,11 @@ def test_rel_attribute():
5959 result = t .parse ('"$":http://domain.tld' )
6060 expect = '\t <p><a href="http://domain.tld" rel="nofollow">domain.tld</a></p>'
6161 assert result == expect
62+
63+ def test_quotes_in_link_text ():
64+ """quotes in link text are tricky."""
65+ test = '""this is a quote in link text"":url'
66+ t = Textile ()
67+ result = t .parse (test )
68+ expect = '\t <p><a href="url">“this is a quote in link text”</a></p>'
69+ assert result == expect
Original file line number Diff line number Diff line change @@ -577,10 +577,6 @@ def glyphs(self, text):
577577 So, for the first pass, we use the glyph_search_initial set of
578578 regexes. For all remaining passes, we use glyph_search
579579 """
580- # fix: hackish
581- if text .endswith ('"' ):
582- text = '{0} ' .format (text )
583-
584580 text = text .rstrip ('\n ' )
585581 result = []
586582 searchlist = self .glyph_search_initial
@@ -729,7 +725,7 @@ def markStartOfLinks(self, text):
729725
730726 try :
731727 possibility = possible_start_quotes .pop ()
732- except IndexError :
728+ except IndexError : # pragma: no branch
733729 # If out of possible starting segments we back the
734730 # last one from the linkparts array
735731 linkparts .pop ()
You can’t perform that action at this time.
0 commit comments