Skip to content

Commit

Permalink
Replace tabs in error messages by 2 spaces (issue #444).
Browse files Browse the repository at this point in the history
  • Loading branch information
johncbowman committed Jun 19, 2024
1 parent 39dff90 commit 7d063be
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions errormsg.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include <cstdio>
#include <cstdlib>
#include <regex>

#include "errormsg.h"
#include "interact.h"
Expand All @@ -33,6 +34,7 @@ ostream& operator<< (ostream& out, const position& pos)
while(count > 0 && getline(fin,s)) {
count--;
}
s=std::regex_replace(s,std::regex("\t")," ");
out << s << endl;
for(size_t i=1; i < pos.column; ++i)
out << " ";
Expand Down

0 comments on commit 7d063be

Please sign in to comment.