aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Format/Format.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r--clang/lib/Format/Format.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index eec5cc8..b90bd82 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/lib/Format/Format.cpp
@@ -4086,8 +4086,10 @@ static FormatStyle::LanguageKind getLanguageByFileName(StringRef FileName) {
return FormatStyle::LK_TableGen;
if (FileName.ends_with_insensitive(".cs"))
return FormatStyle::LK_CSharp;
- if (FileName.ends_with_insensitive(".json"))
+ if (FileName.ends_with_insensitive(".json") ||
+ FileName.ends_with_insensitive(".ipynb")) {
return FormatStyle::LK_Json;
+ }
if (FileName.ends_with_insensitive(".sv") ||
FileName.ends_with_insensitive(".svh") ||
FileName.ends_with_insensitive(".v") ||