diff --git a/README.md b/README.md index df91452..c874233 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ MossMan is a tool designed to ease the filtering, viewing, and compilation of [Stanford MOSS](https://theory.stanford.edu/~aiken/moss/) reports. It is specialized for CMU's 15-122 programing course, generating the outline of a file that is read by another script. It could be used for other courses however. - +![Screenshot](https://ajm.onl/moss.png) ## Adding images diff --git a/src/summarymanager.cpp b/src/summarymanager.cpp index 6072acb..e156dff 100644 --- a/src/summarymanager.cpp +++ b/src/summarymanager.cpp @@ -134,14 +134,24 @@ void LoadReport(std::string s, Fl_Text_Buffer * text, Fl_Text_Buffer * style) { std::regex endcolorpatt("(.*)"); - + size_t count = 0; while (std::getline(stream, line)) { + if (count < 7) { + count++; + continue; + } + + if (line == "" || line == "" || line == "") { + count++; + continue; + } std::smatch matches; std::string formatted = htmlCodesToNormal(line); if(std::regex_search(formatted, matches, startcolorpatt)) { //std::cout << v << std::endl; currentval = NumberToStyle(std::stoi(matches[1])); + count++; continue; } @@ -158,6 +168,7 @@ void LoadReport(std::string s, Fl_Text_Buffer * text, Fl_Text_Buffer * style) { for (size_t i = 0; i < formatted.length()+1; i++) { style->append(currentval.c_str()); } + count++; }