# [beetlsql]从beetlsql偷学markdownParser
@todo
- @code
# MarkdownParser
- 判断是否在代码块内 --> inBody(随着解析过程变动)
protected void skipComment() throws IOException{
boolean findComment = false ;
while(true){
String line = nextLine();
if(status==END){
return ;
}
line = line.trim();
if(!findComment&&line.length()==0){
continue ;
}
if(!inBody&&line.startsWith("*")){
//注释符号
findComment = true;
continue;
}else {
String s = line.trim();
if(s.length()==0){
continue;
}
else if(s.startsWith("```")||s.startsWith("~~~")){
//忽略以code block开头的符号
inBody = true;
continue;
}else{
//注释结束
return ;
}
}
}
}
- 忽略以code block开头的符号
String s = str.trim();
if(s.startsWith("```")||s.startsWith("~~~")){
continue;
}