diff --git a/cl_bindgen/processfile.py b/cl_bindgen/processfile.py index e66a5dd..0e887a0 100644 --- a/cl_bindgen/processfile.py +++ b/cl_bindgen/processfile.py @@ -13,9 +13,13 @@ # the pip version of clang doesn't have the comment functions, # so define _output_comment accordingly if hasattr(clang.Cursor, 'raw_comment'): + import re + + doc_decorator_re = re.compile("^\s*[*/]* ?",flags=re.MULTILINE) + def _lispify_comment(comment): comment = comment.replace('"', '\\"') - return comment.replace('*','').replace('/','').strip() + return re.sub(doc_decorator_re, '', comment).strip() def _output_comment(cursor, output, before='', after=''): comment = cursor.raw_comment