Skip to content

Commit ae33ee0

Browse files
committed
make space after "#|" optional for cell options
1 parent e239c13 commit ae33ee0

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

src/core/lib/partition-cell-options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ export function langCommentChars(lang: string): string[] {
256256
}
257257
}
258258
export function optionCommentPattern(comment: string) {
259-
return new RegExp("^" + comment + "\\s*\\| ");
259+
return new RegExp("^" + comment + "\\s*\\| ?");
260260
}
261261

262262
// FIXME this is an awkward spot for this particular entry point

src/resources/editor/tools/vs-code.mjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25008,7 +25008,6 @@ function createLocalizedError(obj) {
2500825008
end: { line: 0, column: 0 }
2500925009
};
2501025010
}
25011-
console.log({ schemaPath });
2501225011
return {
2501325012
source: mappedString(source, [{
2501425013
start: violatingObject.start,
@@ -27200,7 +27199,7 @@ function langCommentChars(lang) {
2720027199
}
2720127200
}
2720227201
function optionCommentPattern(comment) {
27203-
return new RegExp("^" + comment + "\\s*\\| ");
27202+
return new RegExp("^" + comment + "\\s*\\| ?");
2720427203
}
2720527204
var kLangCommentChars = {
2720627205
r: "#",

src/resources/editor/tools/yaml/web-worker.js

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/resources/jupyter/notebook.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ def nb_cell_yaml_options(lang, cell):
465465
def nb_cell_yaml_lines(lang, source):
466466
# determine language comment chars
467467
comment_chars = nb_language_comment_chars(lang)
468-
option_pattern = "^" + comment_chars[0] + "\\s*\\| "
468+
option_pattern = "^" + comment_chars[0] + "\\s*\\| ?"
469469
option_suffix = comment_chars[1] if len(comment_chars) > 1 else None
470470

471471
# go through the lines until we've found all of the yaml

0 commit comments

Comments
 (0)