Skip to content

Commit a3e0b15

Browse files
committed
fixup! Treat ipynb as json
1 parent a924a68 commit a3e0b15

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

clang/tools/clang-format/ClangFormat.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ static cl::opt<std::string> AssumeFileName(
8888
" CSharp: .cs\n"
8989
" Java: .java\n"
9090
" JavaScript: .js .mjs .cjs .ts\n"
91-
" Json: .json\n"
91+
" Json: .json .ipynb\n"
9292
" Objective-C: .m .mm\n"
9393
" Proto: .proto .protodevel\n"
9494
" TableGen: .td\n"

clang/tools/clang-format/clang-format-diff.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def main():
6363
"-iregex",
6464
metavar="PATTERN",
6565
default=r".*\.(?:cpp|cc|c\+\+|cxx|cppm|ccm|cxxm|c\+\+m|c|cl|h|hh|hpp"
66-
r"|hxx|m|mm|inc|js|ts|proto|protodevel|java|cs|json|s?vh?)",
66+
r"|hxx|m|mm|inc|js|ts|proto|protodevel|java|cs|json|ipynb|s?vh?)",
6767
help="custom pattern selecting file paths to reformat "
6868
"(case insensitive, overridden by -regex)",
6969
)

clang/tools/clang-format/git-clang-format

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ def main():
115115
"cjs", # JavaScript
116116
"ts", # TypeScript
117117
"cs", # C Sharp
118-
"json", # Json
118+
"json",
119+
"ipynb", # Json
119120
"sv",
120121
"svh",
121122
"v",

0 commit comments

Comments
 (0)