def _get_line_comment_char(view):
commentChar = ""
commentChar2 = ""
try:
for pair in view.meta_info("shellVariables", 0):
if pair["name"] == "TM_COMMENT_START":
commentChar = pair["value"]
if pair["name"] == "TM_COMMENT_START_2":
commentChar2 = pair["value"]
if commentChar and commentChar2:
break
except TypeError:
pass
if not commentChar2:
return re.escape(commentChar.strip())
else:
return "(" + re.escape(commentChar.strip()) + "|" + re.escape(commentChar2.strip()) + ")"
评论列表
文章目录