Skip to content

Commit 596c204

Browse files
committed
šŸ› Fix(quarto_reportview): Add id to the label chunks in the generated qmd file
1 parent 1abfa27 commit 596c204

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ā€Žvuegen/quarto_reportview.pyā€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ def _generate_plot_code(self, plot, output_file = "") -> str:
332332
"""
333333
# Initialize plot code with common structure
334334
plot_code = f"""```{{python}}
335-
#| label: '{plot.title}'
335+
#| label: '{plot.title} {plot.id}'
336336
#| fig-cap: ""
337337
"""
338338
# If the file path is a URL, generate code to fetch content via requests
@@ -388,7 +388,7 @@ def _generate_dataframe_content(self, dataframe, is_report_static) -> List[str]:
388388

389389
# Append header for DataFrame loading
390390
dataframe_content.append(f"""```{{python}}
391-
#| label: '{dataframe.title}'
391+
#| label: '{dataframe.title} {dataframe.id}'
392392
#| fig-cap: ""
393393
""")
394394
# Mapping of file extensions to read functions
@@ -447,7 +447,7 @@ def _generate_markdown_content(self, markdown) -> List[str]:
447447
# Initialize md code with common structure
448448
markdown_content.append(f"""
449449
```{{python}}
450-
#| label: '{markdown.title}'
450+
#| label: '{markdown.title} {markdown.id}'
451451
#| fig-cap: ""\n""")
452452
# If the file path is a URL, generate code to fetch content via requests
453453
if is_url(markdown.file_path):

0 commit comments

Comments
Ā (0)