monk/codeMarkDown/MD_comment.py

24 lines
460 B
Python

#!/usr/bin/python
import monkDebug as debug
import sys
import monkTools
import re
_comment_code = "[comment]:"
##
## @brief Transcode balise:
## line start with [comment]:
## @param[in] value String to transform.
## @return Transformed string.
##
def transcode(value):
out = "";
for elem in value.split("\n"):
if len(elem) >= len(_comment_code) \
and elem[:len(_comment_code)] == _comment_code:
continue
out += elem + "\n"
return out