quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.98k stars 328 forks source link

Confluence - File attachment links broken #10665

Open soneill-pure opened 3 months ago

soneill-pure commented 3 months ago

Bug description

Links to file attachments result in broken links when publishing to Confluence.

Steps to reproduce

---
title: "Reproducible Quarto Document"
format: confluence-html
---

[Fake Excel workbook](test_files/fake_excel_workbook.xlsx)

Expected behavior

File attachment link should lead to download when clicked on in Confluence.

Actual behavior

When I inspect code on Confluence browser, the macro seems formulated correctly but the link to the attachment is broken

<ac:link>
   <ri:attachment ri:filename="test_files/fake_excel_workbook.xlsx" />
   <ac:plain-text-link-body><![CDATA[Fake Excel workbook]]></ac:plain-text-link-body>
</ac:link>

image

I am able to workaround by injecting the same macro code directly into the Quarto doc. If I do this, then the attachment link isn't broken in Confluence.

```{=confluence}
<ac:link>
  <ri:attachment ri:filename="test_files/fake_excel_workbook.xlsx" />
  <ac:plain-text-link-body><![CDATA[Fake Excel workbook]]></ac:plain-text-link-body>
</ac:link>

### Your environment

- IDE: VSCode 1.92.2
- macOS Sonoma

### Quarto check output

Quarto 1.5.56 [✓] Checking versions of quarto binary dependencies... Pandoc version 3.2.0: OK Dart Sass version 1.70.0: OK Deno version 1.41.0: OK Typst version 0.11.0: OK [✓] Checking versions of quarto dependencies......OK [✓] Checking Quarto installation......OK Version: 1.5.56 Path: /Applications/quarto/bin

[✓] Checking tools....................OK TinyTeX: (not installed) Chromium: (not installed)

[✓] Checking LaTeX....................OK Tex: (not detected)

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK Version: 3.11.9 Path: /Users/soneill/Projects/workflow-research/.venv/bin/python3 Jupyter: 5.7.2 Kernels: python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........(None)

  Unable to locate an installed version of R.
  Install R from https://cloud.r-project.org/
fkgruber commented 1 month ago

This seems to be a function of the type of file. I tried with .txt files and it works fine but with .dot the link is broken.

@soneill-pure how do you see the confluence code?

thanks FKG

soneill-pure commented 1 month ago

@fkgruber in the top right of a Confluence page, I see a button for editing page source which shows the Confluence html

Image