-
Notifications
You must be signed in to change notification settings - Fork 383
Support more alias format in quarto.doc.is_format()
and so in when-format
#12462
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
171 changes: 171 additions & 0 deletions
171
tests/docs/smoke-all/conditional-content/when-format.qmd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,171 @@ | ||
--- | ||
title: Testing when-format | ||
keep-tex: true | ||
keep-typ: true | ||
_quarto: | ||
tests: | ||
latex: | ||
ensureFileRegexMatches: | ||
- ['Only visible in LATEX'] | ||
- ['Only visible in (?!LATEX|PDF)'] | ||
pdf: | ||
ensureLatexFileRegexMatches: | ||
- ['Only visible in LATEX', 'Only visible in PDF'] | ||
- ['Only visible in (?!LATEX|PDF)'] | ||
html: | ||
ensureFileRegexMatches: | ||
- ['Only visible in HTML', 'Only visible in HTMLJS'] | ||
- ['Only visible in (?!HTML)'] | ||
revealjs: | ||
ensureFileRegexMatches: | ||
- ['Only visible in HTML', 'Only visible in HTMLJS', 'Only visible in REVEALJS'] | ||
- ['Only visible in (?!HTML|REVEALJS)'] | ||
|
||
typst: | ||
ensureTypstFileRegexMatches: | ||
- ['Only visible in TYPST'] | ||
- ['Only visible in (?!TYPST)'] | ||
docx: | ||
ensureDocxRegexMatches: | ||
- ['Only visible in DOCX'] | ||
- ['Only visible in (?!DOCX)'] | ||
pptx: | ||
ensurePptxRegexMatches: | ||
- ['Only visible in PPTX'] | ||
- 2 | ||
docusaurus-md: | ||
ensureFileRegexMatches: | ||
- ['Only visible in DOCUSAURUS', 'Only visible in DOCUSAURUSMD', 'Only visible in MARKDOWN'] | ||
- ['Only visible in (?!DOCUSAURUS|MARKDOWN)'] | ||
hugo-md: | ||
ensureFileRegexMatches: | ||
- ['Only visible in HUGO', 'Only visible in MARKDOWN', 'Only visible in HUGOMD'] | ||
- ['Only visible in (?!HUGO|MARKDOWN)'] | ||
gfm: | ||
ensureFileRegexMatches: | ||
- ['Only visible in GFM', 'Only visible in MARKDOWN', 'Only visible in COMMONMARK'] | ||
- ['Only visible in (?!GFM|MARKDOWN|COMMONMARK)'] | ||
commonmark: | ||
ensureFileRegexMatches: | ||
- ['Only visible in COMMONMARK', 'Only visible in MARKDOWN'] | ||
- ['Only visible in (?!GFM|MARKDOWN|COMMONMARK)'] | ||
markdown: | ||
ensureFileRegexMatches: | ||
- ['Only visible in MARKDOWN'] | ||
- ['Only visible in (?!MARKDOWN)'] | ||
confluence-publish: | ||
ensureFileRegexMatches: | ||
- ['Only visible in CONFLUENCE'] | ||
- ['Only visible in (?!CONFLUENCE)'] | ||
asciidoc: | ||
ensureFileRegexMatches: | ||
- ['Only visible in ASCIIDOC'] | ||
- ['Only visible in (?!ASCIIDOC)'] | ||
dashboard: | ||
ensureFileRegexMatches: | ||
- ['Only visible in DASHBOARD', 'Only visible in HTML', 'Only visible in HTMLJS'] | ||
- ['Only visible in (?!HTML|DASHBOARD)'] | ||
email: | ||
ensureFileRegexMatches: | ||
- ['Only visible in EMAIL', 'Only visible in HTML', 'Only visible in HTMLJS'] | ||
- ['Only visible in (?!HTML|EMAIL)'] | ||
ipynb: | ||
ensureFileRegexMatches: | ||
- ['Only visible in IPYNB'] | ||
- ['Only visible in (?!IPYNB)'] | ||
beamer: | ||
ensureLatexFileRegexMatches: | ||
- ['Only visible in BEAMER', 'Only visible in LATEX', 'Only visible in PDF'] | ||
- ['Only visible in (?!BEAMER|LATEX|PDF)'] | ||
--- | ||
|
||
::: {.content-visible when-format="html"} | ||
Only visible in HTML | ||
::: | ||
|
||
::: {.content-visible when-format="revealjs"} | ||
Only visible in REVEALJS | ||
::: | ||
|
||
::: {.content-visible when-format="html:js"} | ||
Only visible in HTMLJS | ||
::: | ||
|
||
::: {.content-visible when-format="latex"} | ||
Only visible in LATEX | ||
::: | ||
|
||
::: {.content-visible when-format="pdf"} | ||
Only visible in PDF | ||
::: | ||
|
||
::: {.content-visible when-format="typst"} | ||
Only visible in TYPST | ||
::: | ||
|
||
::: {.content-visible when-format="docx"} | ||
Only visible in DOCX | ||
::: | ||
|
||
::: {.content-visible when-format="pptx"} | ||
Only visible in PPTX | ||
::: | ||
|
||
::: {.content-visible when-format="epub"} | ||
Only visible in EPUB | ||
::: | ||
|
||
::: {.content-visible when-format="markdown"} | ||
Only visible in MARKDOWN | ||
::: | ||
|
||
::: {.content-visible when-format="gfm"} | ||
Only visible in GFM | ||
::: | ||
|
||
::: {.content-visible when-format="commonmark"} | ||
Only visible in COMMONMARK | ||
::: | ||
|
||
::: {.content-visible when-format="asciidoc"} | ||
Only visible in ASCIIDOC | ||
::: | ||
|
||
::: {.content-visible when-format="docusaurus"} | ||
Only visible in DOCUSAURUS | ||
::: | ||
|
||
::: {.content-visible when-format="docusaurus-md"} | ||
Only visible in DOCUSAURUSMD | ||
::: | ||
|
||
::: {.content-visible when-format="hugo"} | ||
Only visible in HUGO | ||
::: | ||
|
||
::: {.content-visible when-format="hugo-md"} | ||
Only visible in HUGOMD | ||
::: | ||
|
||
::: {.content-visible when-format="confluence"} | ||
Only visible in CONFLUENCE | ||
::: | ||
|
||
::: {.content-visible when-format="dashboard"} | ||
Only visible in DASHBOARD | ||
::: | ||
|
||
::: {.content-visible when-format="email"} | ||
Only visible in EMAIL | ||
::: | ||
|
||
::: {.content-visible when-format="ipynb"} | ||
Only visible in IPYNB | ||
::: | ||
|
||
::: {.content-visible when-format="beamer"} | ||
Only visible in BEAMER | ||
::: | ||
|
||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.