Bug 410895

Summary: Raw C++ literals on more than two lines with custom start/end text break formatter
Product: [Applications] kdevelop Reporter: Valeri <v19930312>
Component: AstyleAssignee: kdevelop-bugs-null
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version: 5.4.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Valeri 2019-08-14 11:17:02 UTC
SUMMARY
When using C++11 raw literals which use three or more lines AND custom text for termination, formatter stops doing its job after meeting one.
Part of file before one, however, is still changed properly.

STEPS TO REPRODUCE
1. Create C++ file
2. Use raw literal which take three or more lines in it and use custom text for termination (example below)
3. Use option "Reformat source"

OBSERVED RESULT
Only lines before raw literal are properly formatted.

EXPECTED RESULT
All the lines are formatted.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Ubuntu 19.04/NA
KDE Frameworks Version: 5.56.0
Qt Version: 5.12.2

ADDITIONAL INFORMATION
Reproduced both on mainstream Ubuntu package (5.3.2) and kf5 PPA build (5.4.1).

Test cases:

Work fine:

R"(
Work fine
)";

R"TEST(Work fine)TEST";

R"TEST(
Work fine)TEST";

R"TEST(Work fine
)TEST";

Break formatter:

R"TEST(
Time to break formatting!
)TEST";
Comment 1 Valeri 2019-08-14 11:20:08 UTC
Actually, removing custom text didn't helped in real project, so first test case may be misleading.