Skip to content

Commit

Permalink
Add rust comments to list of support languages
Browse files Browse the repository at this point in the history
  • Loading branch information
dragonstyle committed Jan 10, 2024
1 parent fca967e commit 084df08
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/core/jupyter/jupyter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1175,6 +1175,7 @@ const kLangCommentChars: Record<string, string | string[]> = {
mermaid: "%%",
apl: "⍝",
ocaml: ["(*", "*)"],
rust: "//",
};

function cleanJupyterOutputDisplayData(
Expand Down
1 change: 1 addition & 0 deletions src/core/lib/partition-cell-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ export const kLangCommentChars: Record<string, string | [string, string]> = {
ojs: "//",
apl: "⍝",
ocaml: ["(*", "*)"],
rust: "//",
};

function escapeRegExp(str: string) {
Expand Down
3 changes: 2 additions & 1 deletion src/resources/filters/modules/constants.lua
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ local kLangCommentChars = {
markdown = {"<!--", "-->"},
gap = { "#" },
dockerfile = { "#" },
ocaml = { "(*", "*)"}
ocaml = { "(*", "*)"},
rust = { "// "}
}
local kDefaultCodeAnnotationComment = {"#"}

Expand Down
3 changes: 2 additions & 1 deletion src/resources/rmd/hooks.R
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,8 @@ engine_comment_chars <- function(engine) {
haskell = "--",
dot = "//",
apl = "\u235D",
ocaml = c("(*", "*)")
ocaml = c("(*", "*)"),
rust = "//"
)
comment_chars[[engine]] %||% "#"
}
Expand Down

0 comments on commit 084df08

Please sign in to comment.