clang-format WebKit style breaks C++11 raw string literals

[~]> cat r.cpp
static const char* progressCSS = R"(QProgressBar::chunk{
                                 background-color: #3add36;
                                 width: 1px;
                                 }
                                 QProgressBar{
                                 border: 2px solid grey;
                                 border-radius: 0px;
                                 font: bold;
                                 text-align: center;
                                 })";

[~]> clang-format -style=WebKit r.cpp
static const char* progressCSS = R "(QProgressBar::chunk{
    background - color : #3add36;
width:
1px;
}
QProgressBar
{
border:
    2px solid grey;
    border - radius : 0px;
font:
    bold;
    text - align : center;
})";

Seems to confuse cpp with css.

Are you running it in c+±11 mode?

I didn't know it has such a mode. --help doesn't list it, how can I enable it?

Thanks.

Yea, WebKit explicitly sets C++03 mode.
You’ll want:
BasedOnStyle: WebKit
Standard: LS_Cpp11

Thanks that fixes it. For the lazy one, for configuration you have to
omit LS_ part so it is Standard: Cpp11 and all the flags seems to be
documented in http://clang.llvm.org/docs/ClangFormatStyleOptions.html

Regards,
ismail

Probably because WebKit style uses C++03 instead of C++11:

FormatStyle getWebKitStyle() {
FormatStyle Style = getLLVMStyle();

Style.Standard = FormatStyle::LS_Cpp03;

return Style;
}

If WebKit is using C++11 then that should be updated.