X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=wrw%2Fsp%2Futil.py;h=adad53766348e723ae2e57536ed54ea367c31f50;hb=3414365c207c42f3a2d26edac5b5a1d0bd782d7a;hp=c9f940113cefb6971273d7fa83b40d580a7a9317;hpb=a878e812794ab36d47721a680a1bea5f4e1bcc45;p=wrw.git diff --git a/wrw/sp/util.py b/wrw/sp/util.py index c9f9401..adad537 100644 --- a/wrw/sp/util.py +++ b/wrw/sp/util.py @@ -44,6 +44,9 @@ class formatter(object): def text(self, el): self.quotewrite(el) + def rawcode(self, el): + self.write(el) + def attrval(self, buf): qc, qt = ("'", "'") if '"' in buf else ('"', """) self.write(qc) @@ -112,6 +115,8 @@ class formatter(object): self.element(el) elif isinstance(el, cons.text): self.text(el) + elif isinstance(el, cons.raw): + self.rawcode(el) else: raise Exception("Unknown object in element tree: " + el)