rupenp / templatemaker

Automatically exported from code.google.com/p/templatemaker
0 stars 0 forks source link

unexpected behavior #8

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
t = Template()
t.learn('<html><p>coucou</p><b>this and that</b></html>')
t.learn('<html><p>kiki</p><b>this and that</b></html>')
t.learn('<html><b>me and you</b></html>')
print t.as_text('!')
>>> <html><!b>! and !</b></html>

while we expect:
>>> <html>!<b>! and !</b></html>
that can only be obtain appending a ' ' in the last learn:
t.learn('<html> <b>me and you</b></html>')

so, learning html template in real world quickly goes wrong...

Original issue reported on code.google.com by sforne...@gmail.com on 18 May 2008 at 12:22