diff --git a/codeBB/BB_Code.py b/codeBB/BB_Code.py index 349e43c..49c311e 100644 --- a/codeBB/BB_Code.py +++ b/codeBB/BB_Code.py @@ -16,11 +16,13 @@ import re ## @return Transformed string. ## def transcode(value): + #value = re.sub(r'\[code(( |\t|\n|\r)+style=(.*))?\](.*?)\[/code\]', + value = re.sub(r'\[code(( |\t|\n|\r)+style=(.*?))?\](.*?)\[/code\]', + r'
\4
', + value, + flags=re.DOTALL) - value = re.sub(r'\[code=(\#[0-9A-F]{6}|[a-z\-]+)\](.*?)\[/color\]', - r'\2', - value) - + # TODO : remove the basic indentation of the element (to have a better display in the text tutorial ... return value diff --git a/codeBB/BB_IndentAndDot.py b/codeBB/BB_IndentAndDot.py index ab2e3c7..a4de40b 100644 --- a/codeBB/BB_IndentAndDot.py +++ b/codeBB/BB_IndentAndDot.py @@ -47,13 +47,15 @@ def transcode(value): value = re.sub(r'\n:', r'\n:INDENT:', value) - p = re.compile('((\:INDENT\:(.*?)\n)*)') + p = re.compile('((\:INDENT\:(.*?)\n)*)', + flags=re.DOTALL) value = p.sub(replace_wiki_identation, value) value = re.sub(r'\*\*(.*?)\n', r'
  • \1
  • ', - value) + value, + flags=re.DOTALL) return value @@ -61,7 +63,7 @@ def transcode(value): def replace_wiki_identation(match): if match.group() == "": return "" - debug.info("plop: " + str(match.group())) + #debug.verbose("plop: " + str(match.group())) value = "