File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -209,7 +209,10 @@ inline size_t isNewline(std::string_view data)
209209 // normal newline
210210 if (data[0 ] == ' \n ' ) return 1 ;
211211 // artificial new line from ^^ in ALIASES
212- if (literal_at (data," \\ ilinebr " )) return 8 ;
212+ if (literal_at (data," \\ ilinebr" ))
213+ {
214+ return (data.size ()>8 && data[8 ]==' ' ) ? 9 : 8 ; // also count space after \ilinebr if present
215+ }
213216 return 0 ;
214217}
215218
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ template <size_t N>
106106bool literal_at (std::string_view data,const char (&str)[N])
107107{
108108 size_t len = N-1 ; // exclude 0 terminator
109- return len<data.size () && data[0 ]==str[0 ] && qstrncmp (data.data ()+1 ,str+1 ,len-1 )==0 ;
109+ return len<= data.size () && data[0 ]==str[0 ] && qstrncmp (data.data ()+1 ,str+1 ,len-1 )==0 ;
110110}
111111
112112#endif // STRINGUTIL_H
You can’t perform that action at this time.
0 commit comments