Change internal links rendering using python-creole?

I think I have found a quite dirty way to do this. Looking to creole source-code, the code which turns links to html is here: def link_emit(self, node): target = node. Content if node.

Children: inside = self. Emit_children(node) else: inside = self. Html_escape(target) return '%s' % ( self.

Attr_escape(target), inside) In a python shell I have tried the following code: import creole >>> from creole. Creole2html import emitter >>> def new_emitter(self, node): ... return 'blah' >>> emitter.HtmlEmitter. Link_emit = new_emitter >>> creole.

Creole2html(u"link") u'blah.

I think I have found a quite dirty way to do this. Looking to creole source-code, the code which turns links to html is here: def link_emit(self, node): target = node. Content if node.

Children: inside = self. Emit_children(node) else: inside = self. Html_escape(target) return '%s' % ( self.

Attr_escape(target), inside) In a python shell I have tried the following code: >>> import creole >>> from creole. Creole2html import emitter >>> def new_emitter(self, node): ... return 'blah' >>> emitter.HtmlEmitter. Link_emit = new_emitter >>> creole.

Creole2html(u"link") u'blah' The exact code to replace spaces by '_' is left as an exercice to the reader... I'm still looking for a more correct way to do this in "the official way".

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions