forked from qt-creator/qt-creator
Json: Fix indenter for json files.
Change-Id: Id864509dd78a70fc34a3798b80f7e1c8991181f4 Reviewed-on: http://codereview.qt-project.org/6038 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
This commit is contained in:
@@ -90,6 +90,7 @@ void CodeFormatter::recalculateStateAfter(const QTextBlock &block)
|
||||
switch (kind) {
|
||||
case Identifier: enter(objectdefinition_or_js); continue;
|
||||
case Import: enter(top_qml); continue;
|
||||
case LeftBrace: enter(top_js); enter(expression); continue; // if a file starts with {, it's likely json
|
||||
default: enter(top_js); continue;
|
||||
} break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user