X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/d887dee631335a8c44ef75250524e69e67fbc9b4..fcaf06749607b02e11e4edc3b8ae8313e1a1ef91:/librarian/pyhtml.py diff --git a/librarian/pyhtml.py b/librarian/pyhtml.py index d138701..6d1e914 100644 --- a/librarian/pyhtml.py +++ b/librarian/pyhtml.py @@ -9,6 +9,7 @@ from xmlutils import Xmill, tag, tagged, ifoption, tag_open_close from librarian import functions import re import random +from copy import deepcopy IMAGE_THUMB_WIDTH = 300 @@ -444,12 +445,10 @@ class Luki(Exercise): return question.xpath(".//luka") def solution_html(self, piece): + piece = deepcopy(piece) + piece.tail = None sub = EduModule() return sub.generate(piece) - # print piece.text - # return piece.text + ''.join( - # [etree.tostring(n, encoding=unicode) - # for n in piece]) def handle_pytanie(self, element): qpre, qpost = super(Luki, self).handle_pytanie(element)