diff options
author | Tim Clephas <tim.clephas@nobleo.nl> | 2025-04-10 20:40:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-10 20:40:43 +0200 |
commit | c893f1d18da6547027648f44592f61c08570d80f (patch) | |
tree | f2ffb6a470d8327306330e07c1dab34c44fa6c11 /clang/lib/Format/Format.cpp | |
parent | 8bea91f677be4a05b1256a8052ab84dcd7ccb050 (diff) | |
download | llvm-c893f1d18da6547027648f44592f61c08570d80f.zip llvm-c893f1d18da6547027648f44592f61c08570d80f.tar.gz llvm-c893f1d18da6547027648f44592f61c08570d80f.tar.bz2 |
Treat ipynb as json (#135137)
Fixes #110727
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r-- | clang/lib/Format/Format.cpp | 4 |
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") || |