Skip to content

Commit 2afcfab

Browse files
committed
add *.hpp file extension to C++
1 parent 6c6a01f commit 2afcfab

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

Sources/CodeEditLanguages/CodeLanguage.swift

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,12 @@ public extension CodeLanguage {
168168
static let c: CodeLanguage = .init(id: .c, tsName: "c", extensions: ["c", "h", "o"])
169169

170170
/// A language structure for `C++`
171-
static let cpp: CodeLanguage = .init(id: .cpp,
172-
tsName: "cpp",
173-
extensions: ["cpp", "h", "cc"],
174-
parentURL: CodeLanguage.c.queryURL)
171+
static let cpp: CodeLanguage = .init(
172+
id: .cpp,
173+
tsName: "cpp",
174+
extensions: ["cpp", "h", "hpp", "cc"],
175+
parentURL: CodeLanguage.c.queryURL
176+
)
175177

176178
/// A language structure for `C#`
177179
static let cSharp: CodeLanguage = .init(id: .cSharp, tsName: "c-sharp", extensions: ["cs"])
@@ -207,10 +209,12 @@ public extension CodeLanguage {
207209
static let json: CodeLanguage = .init(id: .json, tsName: "json", extensions: ["json"])
208210

209211
/// A language structure for `JSX`
210-
static let jsx: CodeLanguage = .init(id: .jsx,
211-
tsName: "javascript",
212-
extensions: ["jsx"],
213-
highlights: ["highlights-jsx"])
212+
static let jsx: CodeLanguage = .init(
213+
id: .jsx,
214+
tsName: "javascript",
215+
extensions: ["jsx"],
216+
highlights: ["highlights-jsx"]
217+
)
214218

215219
/// A language structure for `PHP`
216220
static let php: CodeLanguage = .init(id: .php, tsName: "php", extensions: ["php"])

0 commit comments

Comments
 (0)