Skip to content

Commit 164c049

Browse files
committed
warn users about fig-width and fig-height at cell level
1 parent e620b90 commit 164c049

File tree

4 files changed

+62
-14
lines changed

4 files changed

+62
-14
lines changed

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

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12364,12 +12364,18 @@ var require_yaml_intelligence_resources = __commonJS({
1236412364
{
1236512365
name: "fig-width",
1236612366
schema: "number",
12367-
description: "Default width for figures generated by Matplotlib or R graphics"
12367+
description: {
12368+
short: "Default width for figures generated by Matplotlib or R graphics",
12369+
long: "Default width for figures generated by Matplotlib or R graphics.\n\nNote that with the Jupyter engine, this option has no effect when\nprovided at the cell level; it can only be provided with\ndocument or project metadata.\n"
12370+
}
1236812371
},
1236912372
{
1237012373
name: "fig-height",
1237112374
schema: "number",
12372-
description: "Default height for figures generated by Matplotlib or R graphics"
12375+
description: {
12376+
short: "Default height for figures generated by Matplotlib or R graphics",
12377+
long: "Default width for figures generated by Matplotlib or R graphics.\n\nNote that with the Jupyter engine, this option has no effect when\nprovided at the cell level; it can only be provided with\ndocument or project metadata.\n"
12378+
}
1237312379
},
1237412380
{
1237512381
name: "fig-format",
@@ -12387,7 +12393,10 @@ var require_yaml_intelligence_resources = __commonJS({
1238712393
{
1238812394
name: "fig-dpi",
1238912395
schema: "number",
12390-
description: "Default DPI for figures generated by Matplotlib or R graphics"
12396+
description: {
12397+
short: "Default DPI for figures generated by Matplotlib or R graphics",
12398+
long: "Default DPI for figures generated by Matplotlib or R graphics.\n\nNote that with the Jupyter engine, this option has no effect when\nprovided at the cell level; it can only be provided with\ndocument or project metadata.\n"
12399+
}
1239112400
},
1239212401
{
1239312402
name: "fig-asp",
@@ -26476,7 +26485,7 @@ function createSourceContext(src, location) {
2647626485
const endColumn = lineNumber < end.line ? rawLine.length : end.column;
2647726486
contextLines.push(content);
2647826487
contextLines.push(
26479-
" ".repeat(prefixWidth + startColumn) + "~".repeat(endColumn - startColumn)
26488+
" ".repeat(prefixWidth + startColumn - 1) + "~".repeat(endColumn - startColumn + 1)
2648026489
);
2648126490
}
2648226491
}

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

Lines changed: 13 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/resources/editor/tools/yaml/yaml-intelligence-resources.json

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5340,12 +5340,18 @@
53405340
{
53415341
"name": "fig-width",
53425342
"schema": "number",
5343-
"description": "Default width for figures generated by Matplotlib or R graphics"
5343+
"description": {
5344+
"short": "Default width for figures generated by Matplotlib or R graphics",
5345+
"long": "Default width for figures generated by Matplotlib or R graphics.\n\nNote that with the Jupyter engine, this option has no effect when\nprovided at the cell level; it can only be provided with\ndocument or project metadata.\n"
5346+
}
53445347
},
53455348
{
53465349
"name": "fig-height",
53475350
"schema": "number",
5348-
"description": "Default height for figures generated by Matplotlib or R graphics"
5351+
"description": {
5352+
"short": "Default height for figures generated by Matplotlib or R graphics",
5353+
"long": "Default width for figures generated by Matplotlib or R graphics.\n\nNote that with the Jupyter engine, this option has no effect when\nprovided at the cell level; it can only be provided with\ndocument or project metadata.\n"
5354+
}
53495355
},
53505356
{
53515357
"name": "fig-format",
@@ -5363,7 +5369,10 @@
53635369
{
53645370
"name": "fig-dpi",
53655371
"schema": "number",
5366-
"description": "Default DPI for figures generated by Matplotlib or R graphics"
5372+
"description": {
5373+
"short": "Default DPI for figures generated by Matplotlib or R graphics",
5374+
"long": "Default DPI for figures generated by Matplotlib or R graphics.\n\nNote that with the Jupyter engine, this option has no effect when\nprovided at the cell level; it can only be provided with\ndocument or project metadata.\n"
5375+
}
53675376
},
53685377
{
53695378
"name": "fig-asp",

src/resources/schema/document-figures.yml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,24 @@
11
- name: fig-width
22
schema: number
3-
description: "Default width for figures generated by Matplotlib or R graphics"
3+
description:
4+
short: "Default width for figures generated by Matplotlib or R graphics"
5+
long: |
6+
Default width for figures generated by Matplotlib or R graphics.
7+
8+
Note that with the Jupyter engine, this option has no effect when
9+
provided at the cell level; it can only be provided with
10+
document or project metadata.
411
512
- name: fig-height
613
schema: number
7-
description: "Default height for figures generated by Matplotlib or R graphics"
14+
description:
15+
short: "Default height for figures generated by Matplotlib or R graphics"
16+
long: |
17+
Default width for figures generated by Matplotlib or R graphics.
18+
19+
Note that with the Jupyter engine, this option has no effect when
20+
provided at the cell level; it can only be provided with
21+
document or project metadata.
822
923
- name: fig-format
1024
schema:
@@ -13,7 +27,14 @@
1327

1428
- name: fig-dpi
1529
schema: number
16-
description: "Default DPI for figures generated by Matplotlib or R graphics"
30+
description:
31+
short: "Default DPI for figures generated by Matplotlib or R graphics"
32+
long: |
33+
Default DPI for figures generated by Matplotlib or R graphics.
34+
35+
Note that with the Jupyter engine, this option has no effect when
36+
provided at the cell level; it can only be provided with
37+
document or project metadata.
1738
1839
- name: fig-asp
1940
tags:

0 commit comments

Comments
 (0)