Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _build(self,mo,element_store, environ):
try:
abbr, title = mo.group(1).split(":", 1)
except ValueError:
abbr = mo.group(1)
title = None
return creoleparser.core.bldr.tag.__getattr__('abbr')(
creoleparser.core.fragmentize(abbr,
self.child_elements,
element_store, environ), title=title)
def _build(self, mo, element_store, environ):
try:
abbr, title = mo.group(1).split(":", 1)
except ValueError:
abbr = mo.group(1)
title = None
return creoleparser.core.bldr.tag.__getattr__('abbr')(
creoleparser.core.fragmentize(abbr,
self.child_elements,
element_store, environ), title=title)
def _build(self, mo, element_store, environ):
lang = mo.group(1)
code = mo.group(2).rstrip()
return creoleparser.core.bldr.tag.__getattr__(self.tag)(
creoleparser.core.fragmentize(code, self.child_elements,
element_store, environ, remove_escapes=False),
class_="highlight lang-" + lang,
lang=lang # the most restrictive markup rendering strips the class attribute, but not lang.
)
def _build(self,mo,element_store, environ):
lang = mo.group(1)
code = mo.group(2).rstrip()
return creoleparser.core.bldr.tag.__getattr__(self.tag)(
creoleparser.core.fragmentize(code, self.child_elements,
element_store, environ, remove_escapes=False),
class_="brush: "+lang)