We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 78cfa29 commit 8923fedCopy full SHA for 8923fed
1 file changed
src/lib/Util.cpp
@@ -73,7 +73,7 @@ std::string handle_indent(int indent, std::string content){
73
if(indent >= 0){
74
// measure indent
75
size_t space_pos = content.find_first_not_of(" \t\n\r\v");
76
- if(space_pos != std::string::npos){
+ if((space_pos != std::string::npos) && (space_pos != 0)){
77
std::string spaces = content.substr(0, space_pos);
78
content = content.substr(space_pos);
79
content = std::regex_replace(content, std::regex(spaces), "\n" + std::string(indent, ' '));
0 commit comments