Skip to content

Commit

Permalink
Merge pull request #19 from zer0-star/feat/comment
Browse files Browse the repository at this point in the history
コメントを効率的に削除するように
  • Loading branch information
abap34 authored Sep 14, 2023
2 parents e7d1241 + bd7a171 commit 32e38f3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/parse.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,10 @@ namespace almo {
all_line_str += '\n';
}

std::regex comment = std::regex("<!--[\\s\\S]*?-->");

all_line_str = std::regex_replace(all_line_str, comment, "");

std::vector<std::string> processed_lines;

// 改行で分割
Expand Down Expand Up @@ -542,4 +546,4 @@ namespace almo {

return {meta_data, BlockParser::processer({processed_lines.begin() + meta_data_end, processed_lines.end()})};
}
}
}

0 comments on commit 32e38f3

Please sign in to comment.