forked from qt-creator/qt-creator
Fixed indentation of single line QML/JS comments.
This commit is contained in:
@@ -226,9 +226,11 @@ QString QScriptIndenter::trimmedCodeLine(const QString &t)
|
|||||||
int e = token.length;
|
int e = token.length;
|
||||||
|
|
||||||
if (token.offset > 0 || startState == 0) {
|
if (token.offset > 0 || startState == 0) {
|
||||||
|
if (token.length >= 2 && t.midRef(token.offset, 2) == QLatin1String("/*")) {
|
||||||
trimmed.append(QLatin1String("/*"));
|
trimmed.append(QLatin1String("/*"));
|
||||||
i += 2;
|
i += 2;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool needEndOfComment = false;
|
bool needEndOfComment = false;
|
||||||
if (e > 2 && token.end() == t.length() && scanner.endState() != 0) {
|
if (e > 2 && token.end() == t.length() && scanner.endState() != 0) {
|
||||||
|
Reference in New Issue
Block a user