Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figure label and caption aren't processing markdown in the lightbox but are on the page #687

Closed
1 task done
geealbers opened this issue Mar 8, 2023 · 2 comments
Closed
1 task done
Labels
bug Actual behavior does not match expected behavior quire-11ty This is an issue with the quire-11ty package

Comments

@geealbers
Copy link
Member

Before proceeding, check to make sure there isn’t an existing issue for this bug.

  • I have searched the existing issues and determined this is a new bug.

Steps to reproduce

  1. Add markdown formatting to the text of a figure label and figure credit in figures.yaml
  2. Run quire preview

Actual behavior

The markdown formatting is processed and rendering correctly when the image and caption info is viewed on the page, but not so in the lightbox modal

Expected behavior

The text of the label and credit should be processed and appear the same in all locations

Version numbers

macOS
node 18.12.1
Quire 1.0.0-rc.5 (but is issue in earlier versions as well)

What browsers are you seeing the problem on?

No response

Relevant Terminal/Shell output

No response

Supporting Information

I believe we just need to make use of the markdownify filter in _includes/components/lightbox/slides.js, lines 57–62 (below), to match what's done in _includes/components/figure/label.js and _includes/components/figure/caption.js.

 const labelSpan = label
        ? html`<span class="q-lightbox-slides__caption-label">${label}</span>`
        : ''
const captionAndCreditSpan = caption || credit
        ? html`<span class="q-lightbox-slides__caption-content">${caption ? markdownify(caption) : ''} ${credit ? credit : ''}</span>`
        : '' 
@geealbers geealbers added the status:triage needed Issue needs to be triaged by the Quire team. This label is automatically applied to new issues. label Mar 8, 2023
@Erin-Cecele Erin-Cecele added status:needs discussion Issue needs discussion before being addressed quire-11ty This is an issue with the quire-11ty package bug Actual behavior does not match expected behavior and removed status:triage needed Issue needs to be triaged by the Quire team. This label is automatically applied to new issues. labels May 30, 2023
@geealbers
Copy link
Member Author

@geealbers geealbers added status:selected for development Issue has been triaged and will be fixed and removed status:needs discussion Issue needs discussion before being addressed labels Jun 7, 2023
@geealbers
Copy link
Member Author

Fixed with PR #766, will be included in next quire-11ty release

@geealbers geealbers removed the status:selected for development Issue has been triaged and will be fixed label Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Actual behavior does not match expected behavior quire-11ty This is an issue with the quire-11ty package
Projects
None yet
Development

No branches or pull requests

2 participants