From 41f21943b338a02c644b6e4ad720a57d79fcbf85 Mon Sep 17 00:00:00 2001 From: Gordon Woodhull Date: Wed, 15 May 2024 02:34:29 -0400 Subject: [PATCH] Typst CSS and html-pre-tag-processing --- .github/workflows/test-ff-matrix.yml | 169 + configuration | 2 +- .../crossref/float/figure/document.qmd | 2 +- .../background-color-mediumseagreen.qmd | 32 + .../background-color/document.qmd | 31 + .../span-background-color-mediumseagreen.qmd | 26 + .../css-properties/border/border-badstyle.qmd | 32 + .../border/border-bottom-style-dotted.qmd | 31 + .../css-properties/border/border-color.qmd | 31 + .../border/border-left-color.qmd | 31 + .../border/border-left-style-groove.qmd | 32 + .../border/border-left-style-redo-groove.qmd | 32 + .../border/border-left-style-solid.qmd | 31 + .../css-properties/border/border-remove.qmd | 32 + .../border/border-right-shorthand-color.qmd | 31 + .../border/border-right-shorthand-dashed.qmd | 31 + .../border/border-shorthand-all.qmd | 31 + .../border-shorthand-color-rgb-legacy.qmd | 31 + .../border/border-shorthand-color-rgb.qmd | 31 + ...er-shorthand-color-rgba-legacy-percent.qmd | 31 + .../border/border-shorthand-color-rgba.qmd | 31 + .../border/border-shorthand-color.qmd | 31 + .../css-properties/border/border-style-4.qmd | 31 + .../border/border-top-shorthand-dotted.qmd | 31 + .../border/border-top-shorthand-typo.qmd | 31 + .../css-properties/border/border-width-2.qmd | 31 + .../css-properties/border/border-width-3.qmd | 31 + .../css-properties/border/border-width-cm.qmd | 31 + .../css-properties/border/border-width-ex.qmd | 31 + .../css-properties/border/border-width-in.qmd | 31 + .../border/border-width-invalid.qmd | 32 + .../css-properties/border/border-width-mm.qmd | 31 + .../border/border-width-rem.qmd | 31 + .../border/border-width-rpx.qmd | 31 + .../css-properties/border/document.qmd | 31 + .../css-properties/color/color-fuchsia.qmd | 32 + .../css-properties/color/color-invalid.qmd | 31 + .../css-properties/color/color-magenta.qmd | 31 + .../color/color-mediumseagreen.qmd | 32 + .../css-properties/color/color-rgb-hex.qmd | 31 + .../color/color-transparent.qmd | 31 + .../css-properties/color/document.qmd | 31 + .../css-properties/font-family/document.qmd | 31 + .../font-size/cell-percentage.qmd | 31 + .../css-properties/font-size/document.qmd | 31 + .../css-properties/opacity/document.qmd | 31 + .../opacity/opacity-mediumseagreen.qmd | 32 + .../opacity/opacity-nocolor.qmd | 31 + .../css-properties/opacity/opacity-one.qmd | 31 + .../opacity-rgb-comma-alpha-fraction.qmd | 31 + .../opacity/opacity-rgb-comma-alpha-int.qmd | 32 + .../opacity-rgb-comma-alpha-percent.qmd | 31 + .../opacity-rgb-comma-percent-alpha.qmd | 31 + .../opacity/opacity-rgb-comma-percent.qmd | 31 + .../opacity/opacity-rgb-comma.qmd | 31 + .../opacity/opacity-rgb-hex-alpha.qmd | 31 + .../opacity/opacity-rgb-hex.qmd | 31 + .../opacity/opacity-rgb-shorthex-alpha.qmd | 31 + .../opacity/opacity-rgb-shorthex.qmd | 31 + .../opacity-rgb-space-alpha-fraction.qmd | 31 + .../opacity-rgb-space-alpha-percent.qmd | 31 + ...acity-rgb-space-percent-alpha-fraction.qmd | 31 + .../opacity-rgb-space-percent-alpha-none.qmd | 31 + ...pacity-rgb-space-percent-alpha-percent.qmd | 31 + .../opacity/opacity-rgb-space-percent.qmd | 31 + .../opacity/opacity-rgb-space.qmd | 31 + .../css-properties/opacity/opacity-span.qmd | 27 + .../vertical-align/document.qmd | 31 + .../vertical-align/text-align.qmd | 31 + .../qmd-files/image/alt-text/document.qmd | 14 +- .../layout/fig-align/code-python-caption.qmd | 11 +- .../layout/fig-align/code-r-caption.qmd | 11 +- .../layout/fig-align/toplevel-id-caption.qmd | 11 +- .../fig-align/toplevel-id-nocaption.qmd | 11 +- .../fig-align/toplevel-noid-caption.qmd | 11 +- package/scripts/deno_std/deno_std.ts | 1 + src/dev_import_map.json | 21 + src/resources/deno_std/deno_std.lock | 25 + src/resources/deno_std/run_import_map.json | 3 +- src/resources/filters/layout/typst.lua | 4 +- src/resources/filters/main.lua | 2 + src/resources/filters/modules/constants.lua | 4 +- src/resources/filters/modules/patterns.lua | 3 + src/resources/filters/normalize/parsehtml.lua | 182 +- .../quarto-post/typst-css-to-props.lua | 951 +++ src/resources/scripts/juice.ts | 7 + .../optimized/boolbase.js | 11 + .../optimized/cheerio-select.js | 221 + .../optimized/cheerio.js | 43 + .../optimized/cheerio/lib/utils.js | 42 + .../optimized/common/load-4922a70c.js | 2904 +++++++ .../optimized/css-select.js | 812 ++ .../optimized/css-what.js | 464 ++ .../optimized/dom-serializer.js | 242 + .../optimized/domelementtype.js | 26 + .../optimized/domhandler.js | 343 + .../optimized/domhandler.js | 343 + .../optimized/domutils.js | 483 ++ .../optimized/entities.js | 156 + .../optimized/entities/lib/decode.js | 161 + .../optimized/entities/lib/decode.js | 172 + .../optimized/entities/lib/escape.js | 57 + .../optimized/common/Parser-5b65a52d.js | 1080 +++ .../optimized/htmlparser2.js | 28 + .../optimized/juice.js | 796 ++ .../optimized/mensch.js | 960 +++ .../optimized/nth-check.js | 125 + .../parse5-htmlparser2-tree-adapter.js | 203 + .../optimized/parse5.js | 7326 +++++++++++++++++ .../unoptimized/parser.js | 130 + src/vendor/cdn.skypack.dev/juice@10.0.0.js | 16 + src/vendor/import_map.json | 21 + tests/docs/typst/ansi/ansi-colors.qmd | 35 + .../typst/tables/great-tables/air-quality.qmd | 39 + .../typst/tables/great-tables/islands.qmd | 26 + .../typst/tables/great-tables/oceania.qmd | 47 + tests/docs/typst/tables/gt/air-quality.qmd | 54 + tests/docs/typst/tables/gt/islands.qmd | 44 + tests/docs/typst/tables/gt/mtcars.qmd | 56 + tests/docs/typst/tables/gt/test-pattern.qmd | 24 + .../typst/tables/pandas/acting-on-data.qmd | 31 + .../tables/pandas/concatenating-stylers.qmd | 21 + .../tables/pandas/data-cell-css-classes.qmd | 54 + tests/docs/typst/tables/pandas/weather.qmd | 35 + tools/trace-viewer/styles.css | 7 + 125 files changed, 21022 insertions(+), 108 deletions(-) create mode 100644 .github/workflows/test-ff-matrix.yml create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/background-color/background-color-mediumseagreen.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/background-color/document.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/background-color/span-background-color-mediumseagreen.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-badstyle.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-bottom-style-dotted.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-color.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-left-color.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-left-style-groove.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-left-style-redo-groove.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-left-style-solid.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-remove.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-right-shorthand-color.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-right-shorthand-dashed.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-shorthand-all.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-shorthand-color-rgb-legacy.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-shorthand-color-rgb.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-shorthand-color-rgba-legacy-percent.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-shorthand-color-rgba.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-shorthand-color.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-style-4.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-top-shorthand-dotted.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-top-shorthand-typo.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-width-2.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-width-3.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-width-cm.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-width-ex.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-width-in.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-width-invalid.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-width-mm.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-width-rem.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-width-rpx.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/border/document.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/color/color-fuchsia.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/color/color-invalid.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/color/color-magenta.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/color/color-mediumseagreen.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/color/color-rgb-hex.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/color/color-transparent.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/color/document.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/font-family/document.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/font-size/cell-percentage.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/font-size/document.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/document.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-mediumseagreen.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-nocolor.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-one.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-comma-alpha-fraction.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-comma-alpha-int.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-comma-alpha-percent.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-comma-percent-alpha.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-comma-percent.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-comma.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-hex-alpha.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-hex.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-shorthex-alpha.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-shorthex.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-space-alpha-fraction.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-space-alpha-percent.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-space-percent-alpha-fraction.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-space-percent-alpha-none.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-space-percent-alpha-percent.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-space-percent.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-space.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-span.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/vertical-align/document.qmd create mode 100644 dev-docs/feature-format-matrix/qmd-files/css-properties/vertical-align/text-align.qmd create mode 100644 src/resources/filters/quarto-post/typst-css-to-props.lua create mode 100644 src/resources/scripts/juice.ts create mode 100644 src/vendor/cdn.skypack.dev/-/boolbase@v1.0.0-VOm51i7l8eNaWy5whtPS/dist=es2019,mode=imports/optimized/boolbase.js create mode 100644 src/vendor/cdn.skypack.dev/-/cheerio-select@v2.1.0-3jQ9aaXMWR0anNb0rdBs/dist=es2019,mode=imports/optimized/cheerio-select.js create mode 100644 src/vendor/cdn.skypack.dev/-/cheerio@v1.0.0-rc.12-d2orEfV7mEyxhcmv8Jbn/dist=es2019,mode=imports/optimized/cheerio.js create mode 100644 src/vendor/cdn.skypack.dev/-/cheerio@v1.0.0-rc.12-d2orEfV7mEyxhcmv8Jbn/dist=es2019,mode=imports/optimized/cheerio/lib/utils.js create mode 100644 src/vendor/cdn.skypack.dev/-/cheerio@v1.0.0-rc.12-d2orEfV7mEyxhcmv8Jbn/dist=es2019,mode=imports/optimized/common/load-4922a70c.js create mode 100644 src/vendor/cdn.skypack.dev/-/css-select@v5.1.0-lzo7kuDagEAqaWVyUzkG/dist=es2019,mode=imports/optimized/css-select.js create mode 100644 src/vendor/cdn.skypack.dev/-/css-what@v6.1.0-wTvp3wF3BRcbbnFpaqAF/dist=es2019,mode=imports/optimized/css-what.js create mode 100644 src/vendor/cdn.skypack.dev/-/dom-serializer@v2.0.0-0QgVINP0DwZRFE7238Nk/dist=es2019,mode=imports/optimized/dom-serializer.js create mode 100644 src/vendor/cdn.skypack.dev/-/domelementtype@v2.3.0-PrmNUNoEHMqortEMiiky/dist=es2019,mode=imports/optimized/domelementtype.js create mode 100644 src/vendor/cdn.skypack.dev/-/domhandler@v5.0.2-qvBtZhQ6wRKNZJnPd1dK/dist=es2019,mode=imports/optimized/domhandler.js create mode 100644 src/vendor/cdn.skypack.dev/-/domhandler@v5.0.3-oHQ1zBLd64RIysV9PvVR/dist=es2019,mode=imports/optimized/domhandler.js create mode 100644 src/vendor/cdn.skypack.dev/-/domutils@v3.0.1-AxLWD9jG78wB01z8Pizf/dist=es2019,mode=imports/optimized/domutils.js create mode 100644 src/vendor/cdn.skypack.dev/-/entities@v4.2.0-t42Wo66cVV1L2FcPgERr/dist=es2019,mode=imports/optimized/entities.js create mode 100644 src/vendor/cdn.skypack.dev/-/entities@v4.2.0-t42Wo66cVV1L2FcPgERr/dist=es2019,mode=imports/optimized/entities/lib/decode.js create mode 100644 src/vendor/cdn.skypack.dev/-/entities@v4.3.0-V4vIlnoYfSBRg1gj9BOL/dist=es2019,mode=imports/optimized/entities/lib/decode.js create mode 100644 src/vendor/cdn.skypack.dev/-/entities@v4.3.0-V4vIlnoYfSBRg1gj9BOL/dist=es2019,mode=imports/optimized/entities/lib/escape.js create mode 100644 src/vendor/cdn.skypack.dev/-/htmlparser2@v8.0.1-5ZdnwUWrSTqKCARDEeGB/dist=es2019,mode=imports/optimized/common/Parser-5b65a52d.js create mode 100644 src/vendor/cdn.skypack.dev/-/htmlparser2@v8.0.1-5ZdnwUWrSTqKCARDEeGB/dist=es2019,mode=imports/optimized/htmlparser2.js create mode 100644 src/vendor/cdn.skypack.dev/-/juice@v10.0.0-FUuj4gsVBIZ9bgC3rRoH/dist=es2019,mode=imports/optimized/juice.js create mode 100644 src/vendor/cdn.skypack.dev/-/mensch@v0.3.4-bYdFVPGjq4ZCCd5bQOiD/dist=es2019,mode=imports/optimized/mensch.js create mode 100644 src/vendor/cdn.skypack.dev/-/nth-check@v2.0.1-2f5siX0mso3eC2ZgQX1j/dist=es2019,mode=imports/optimized/nth-check.js create mode 100644 src/vendor/cdn.skypack.dev/-/parse5-htmlparser2-tree-adapter@v7.0.0-Yds3pDou8tm4yIHAlVGV/dist=es2019,mode=imports/optimized/parse5-htmlparser2-tree-adapter.js create mode 100644 src/vendor/cdn.skypack.dev/-/parse5@v7.0.0-4AUKIZfwEPUbwYAbyTrt/dist=es2019,mode=imports/optimized/parse5.js create mode 100644 src/vendor/cdn.skypack.dev/-/slick@v1.12.2-aV7vJdJVxGxCoP6YSykY/dist=es2019,mode=imports/unoptimized/parser.js create mode 100644 src/vendor/cdn.skypack.dev/juice@10.0.0.js create mode 100644 tests/docs/typst/ansi/ansi-colors.qmd create mode 100644 tests/docs/typst/tables/great-tables/air-quality.qmd create mode 100644 tests/docs/typst/tables/great-tables/islands.qmd create mode 100644 tests/docs/typst/tables/great-tables/oceania.qmd create mode 100644 tests/docs/typst/tables/gt/air-quality.qmd create mode 100644 tests/docs/typst/tables/gt/islands.qmd create mode 100644 tests/docs/typst/tables/gt/mtcars.qmd create mode 100644 tests/docs/typst/tables/gt/test-pattern.qmd create mode 100644 tests/docs/typst/tables/pandas/acting-on-data.qmd create mode 100644 tests/docs/typst/tables/pandas/concatenating-stylers.qmd create mode 100644 tests/docs/typst/tables/pandas/data-cell-css-classes.qmd create mode 100644 tests/docs/typst/tables/pandas/weather.qmd create mode 100644 tools/trace-viewer/styles.css diff --git a/.github/workflows/test-ff-matrix.yml b/.github/workflows/test-ff-matrix.yml new file mode 100644 index 0000000000..58fb8b76d8 --- /dev/null +++ b/.github/workflows/test-ff-matrix.yml @@ -0,0 +1,169 @@ +# Tests all documents in the feature-format matrix +name: Feature-Format Tests +on: + workflow_dispatch: + pull_request: + branches: [main] + paths-ignore: + - "src/resources/language/**" + +jobs: + run-smokes: + name: Run feature-format matrix on (${{ matrix.os }}) + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + + - name: Fix temp dir to use runner one (windows) + if: runner.os == 'Windows' + run: | + echo "TMPDIR=${{ runner.temp }}" >> $GITHUB_ENV + echo "TMP=${{ runner.temp }}" >> $GITHUB_ENV + echo "TEMP=${{ runner.temp }}" >> $GITHUB_ENV + shell: bash + + - name: Set up R + uses: r-lib/actions/setup-r@v2 + with: + r-version: "4.3.2" + use-public-rspm: true + # required to avoid rtools bin in path + windows-path-include-rtools: false + + - name: Install node (for Playwright, MECA) + uses: actions/setup-node@v3 + with: + node-version: 16 + + - name: Install node dependencies + if: ${{ runner.os != 'Windows' || github.event_name == 'schedule' }} + run: yarn + working-directory: ./tests/integration/playwright + shell: bash + + - name: Install Playwright Browsers + if: ${{ runner.os != 'Windows' || github.event_name == 'schedule' }} + run: npx playwright install --with-deps + working-directory: ./tests/integration/playwright + + - name: Install MECA validator + if: ${{ runner.os != 'Windows' }} + run: npm install -g meca + + - name: Set RENV_PATHS_ROOT + shell: bash + run: | + echo "RENV_PATHS_ROOT=${{ runner.temp }}/renv" >> $GITHUB_ENV + + - name: Get R and OS version + id: get-version + run: | + cat("os-version=", sessionInfo()$running, "\n", file = Sys.getenv("GITHUB_OUTPUT"), sep = "", append = TRUE) + cat("r-version=", R.Version()$version.string, "\n", file = Sys.getenv("GITHUB_OUTPUT"), sep = "", append = TRUE) + shell: Rscript {0} + + - name: Cache R packages + uses: actions/cache@v3 + with: + path: ${{ env.RENV_PATHS_ROOT }} + key: ${{ steps.get-version.outputs.os-version }}-${{ steps.get-version.outputs.r-version }}-renv-2-${{ hashFiles('tests/renv.lock') }} + restore-keys: | + ${{ steps.get-version.outputs.os-version }}-${{ steps.get-version.outputs.r-version }}-renv-2- + + - name: Install missing system deps + if: runner.os == 'Linux' + run: | + sudo apt-get update -y + sudo apt-get install -y libcurl4-openssl-dev + sudo apt-get install -y libxml2-utils + sudo apt-get install -y libharfbuzz-dev libfribidi-dev + + - name: Restore R packages + working-directory: tests + run: | + if (!requireNamespace('renv', quietly = TRUE)) install.packages('renv') + renv::restore() + # Install dev versions for our testing + # Use r-universe to avoid github api calls + try(install.packages('knitr', repos = 'https://yihui.r-universe.dev')) + try(install.packages('rmarkdown', repos = 'https://rstudio.r-universe.dev')) + shell: Rscript {0} + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.12" + cache: "pipenv" + cache-dependency-path: "./tests/Pipfile.lock" + + - name: Restore Python Dependencies + working-directory: tests + run: | + python -m pip install pipenv + pipenv install + + - uses: ./.github/workflows/actions/quarto-dev + + - name: Install Tinytex + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + quarto install tinytex + + - name: Cache Typst packages + uses: ./.github/actions/cache-typst + + - name: Install Chrome + uses: browser-actions/setup-chrome@latest + + - name: Setup Julia + uses: julia-actions/setup-julia@v1 + with: + version: "1.10" + + - name: Cache Julia Packages + uses: julia-actions/cache@v1 + + - name: Restore Julia Packages + working-directory: tests + shell: bash + run: | + # Setup IJulia with the jupyter from the Python environment + # https://julialang.github.io/IJulia.jl/stable/manual/installation/ + export JUPYTER=$(find $(dirname $(pipenv run which jupyter))/ -type f -name "jupyter.exe" -o -name "jupyter") + pipenv run julia --color=yes --project=. -e "import Pkg; Pkg.instantiate(); Pkg.build(\"IJulia\"); Pkg.precompile()" + echo "Julia Jupyter:" + julia --project=. -e "import IJulia;println(IJulia.JUPYTER);println(IJulia.find_jupyter_subcommand(\"notebook\"))" + + - name: Setup timing file for timed test + if: ${{ matrix.time-test == true }} + run: | + echo "QUARTO_TEST_TIMING=timing-for-ci.txt" >> "$GITHUB_ENV" + + # - name: Setup tmate session + # uses: mxschmitt/action-tmate@v3 + + - name: Run all Smoke Tests Windows + if: ${{ runner.os == 'Windows' && format('{0}', inputs.buckets) == '' && matrix.time-test == false }} + env: + # Useful as TinyTeX latest release is checked in run-test.sh + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: ./run-tests.ps1 ../dev-docs/feature-format-matrix/qmd-files/**/*.qmd + working-directory: tests + shell: pwsh + + - name: Run all Smoke Tests Linux + if: ${{ runner.os != 'Windows' && format('{0}', inputs.buckets) == '' }} + env: + # Useful as TinyTeX latest release is checked in run-test.sh + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: shopt -s globstar && ./run-tests.sh ../dev-docs/feature-format-matrix/**/*.qmd + working-directory: tests + shell: bash diff --git a/configuration b/configuration index 85040b683f..6a66d64c5b 100644 --- a/configuration +++ b/configuration @@ -11,7 +11,7 @@ export DENO=v1.41.0 # TODO figure out where 0.1.41 apple silicon libs are available export DENO_DOM=v0.1.35-alpha-artifacts -export PANDOC=3.1.13 +export PANDOC=3.2 export DARTSASS=1.70.0 export ESBUILD=0.19.12 export TYPST=0.11.0 diff --git a/dev-docs/feature-format-matrix/qmd-files/crossref/float/figure/document.qmd b/dev-docs/feature-format-matrix/qmd-files/crossref/float/figure/document.qmd index 6e8bd1bf13..09c4ab6e7e 100644 --- a/dev-docs/feature-format-matrix/qmd-files/crossref/float/figure/document.qmd +++ b/dev-docs/feature-format-matrix/qmd-files/crossref/float/figure/document.qmd @@ -11,7 +11,7 @@ format: Images with a caption and a label can be referenced using the `@ref` syntax, as @fig-1 shows. -![This is the caption for the figure.](https://placeholder.co/400/400.png){#fig-1} +![This is the caption for the figure.]({{< placeholder 400 >}}){#fig-1} Figures can contain arbitrary content instead of an image. In that case, use the div syntax: diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/background-color/background-color-mediumseagreen.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/background-color/background-color-mediumseagreen.qmd new file mode 100644 index 0000000000..d9381872f8 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/background-color/background-color-mediumseagreen.qmd @@ -0,0 +1,32 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td, span only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + + - + - 'table.cell\(fill: rgb\(60, 179, 113\)\)\[B\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/background-color/document.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/background-color/document.qmd new file mode 100644 index 0000000000..c3f2a851b0 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/background-color/document.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "table cell only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - 'table.cell\(fill: orange\)\[B\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/background-color/span-background-color-mediumseagreen.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/background-color/span-background-color-mediumseagreen.qmd new file mode 100644 index 0000000000..5e7bb8a497 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/background-color/span-background-color-mediumseagreen.qmd @@ -0,0 +1,26 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td, span only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + + - + - '#highlight\(fill: rgb\(60, 179, 113\)\)\[text with a green background\]' + - [] +--- +This is some [text with a green background]{style="background-color:mediumseagreen"}. diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-badstyle.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-badstyle.qmd new file mode 100644 index 0000000000..237e86053b --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-badstyle.qmd @@ -0,0 +1,32 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - '\[A\], \[B\]' + - + - 'table\.cell' +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-bottom-style-dotted.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-bottom-style-dotted.qmd new file mode 100644 index 0000000000..599f9e97e3 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-bottom-style-dotted.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "table cell only; border-{left,top,right,bottom}-{color,style,width} only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - 'table\.cell\(stroke: \(bottom: \(dash: "dotted", thickness: 0.75pt\)\)\)\[A\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-color.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-color.qmd new file mode 100644 index 0000000000..8481d91107 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-color.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - 'table\.cell\(stroke: \(paint: rgb\("#4b0082cd"\)\)\)\[A\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-left-color.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-left-color.qmd new file mode 100644 index 0000000000..7e37f66e0e --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-left-color.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - 'table\.cell\(stroke: \(left: \(paint: rgb\("#4b0082cd"\)\)\)\)\[A\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-left-style-groove.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-left-style-groove.qmd new file mode 100644 index 0000000000..00d539cb5b --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-left-style-groove.qmd @@ -0,0 +1,32 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - '\[A\], \[B\]' + - + - 'table\.cell' +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-left-style-redo-groove.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-left-style-redo-groove.qmd new file mode 100644 index 0000000000..ec683f7ca5 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-left-style-redo-groove.qmd @@ -0,0 +1,32 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - '\[A\], \[B\]' + - + - 'table\.cell' +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-left-style-solid.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-left-style-solid.qmd new file mode 100644 index 0000000000..4249ec2ca6 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-left-style-solid.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - 'table\.cell\(stroke: \(left: \(paint: black\)\)\)\[A\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-remove.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-remove.qmd new file mode 100644 index 0000000000..b3f61f9197 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-remove.qmd @@ -0,0 +1,32 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - '\[A\], \[B\]' + - + - 'table\.cell' +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-right-shorthand-color.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-right-shorthand-color.qmd new file mode 100644 index 0000000000..e50478ccd7 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-right-shorthand-color.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - 'table\.cell\(stroke: \(right: \(paint: rgb\(178, 34, 34\), thickness: 2.25pt\)\)\)\[A\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-right-shorthand-dashed.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-right-shorthand-dashed.qmd new file mode 100644 index 0000000000..85b6ef60f0 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-right-shorthand-dashed.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - 'table\.cell\(stroke: \(right: \(dash: "dashed", paint: rgb\(178, 34, 34\), thickness: 2.25pt\)\)\)\[A\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-shorthand-all.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-shorthand-all.qmd new file mode 100644 index 0000000000..b9f02198f7 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-shorthand-all.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - 'table\.cell\(stroke: \(paint: rgb\("#eee"\), thickness: 3pt\)\)\[A\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-shorthand-color-rgb-legacy.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-shorthand-color-rgb-legacy.qmd new file mode 100644 index 0000000000..d306a0d337 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-shorthand-color-rgb-legacy.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - 'table\.cell\(stroke: \(paint: rgb\(0, 0, 127\), thickness: 2.25pt\)\)\[A\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-shorthand-color-rgb.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-shorthand-color-rgb.qmd new file mode 100644 index 0000000000..0242986e73 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-shorthand-color-rgb.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - 'table\.cell\(stroke: \(paint: rgb\(200, 200, 200\), thickness: 2.25pt\)\)\[A\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-shorthand-color-rgba-legacy-percent.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-shorthand-color-rgba-legacy-percent.qmd new file mode 100644 index 0000000000..447d5586f7 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-shorthand-color-rgba-legacy-percent.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - 'table\.cell\(stroke: \(paint: rgb\(33%, 42%, 18%, 85%\), thickness: 3.75pt\)\)\[A\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-shorthand-color-rgba.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-shorthand-color-rgba.qmd new file mode 100644 index 0000000000..706147bb54 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-shorthand-color-rgba.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - 'table\.cell\(stroke: \(paint: rgb\(200, 100, 200, 30%\), thickness: 2.25pt\)\)\[A\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-shorthand-color.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-shorthand-color.qmd new file mode 100644 index 0000000000..d3130bf8d6 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-shorthand-color.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - 'table\.cell\(stroke: \(paint: red, thickness: 2.25pt\)\)\[A\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-style-4.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-style-4.qmd new file mode 100644 index 0000000000..39a8ad86d9 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-style-4.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - 'table\.cell\(stroke: \(bottom: \(dash: "dashed"\), right: \(dash: "dashed"\), top: \(dash: "dotted"\)\)\)\[A\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-top-shorthand-dotted.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-top-shorthand-dotted.qmd new file mode 100644 index 0000000000..3440e00af6 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-top-shorthand-dotted.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - 'table\.cell\(stroke: \(top: \(dash: "dotted", paint: rgb\(173, 255, 47\), thickness: 3.75pt\)\)\)\[A\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-top-shorthand-typo.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-top-shorthand-typo.qmd new file mode 100644 index 0000000000..33c6deb17f --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-top-shorthand-typo.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - 'table\.cell\(stroke: \(top: \(dash: "dotted", paint: rgb\(173, 255, 47\), thickness: 2.25pt\)\)\)\[A\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-width-2.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-width-2.qmd new file mode 100644 index 0000000000..e43ab3c992 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-width-2.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - 'table\.cell\(stroke: \(bottom: \(thickness: 6pt\), left: \(thickness: 3pt\), right: \(thickness: 3pt\), top: \(thickness: 6pt\)\)\)\[A\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-width-3.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-width-3.qmd new file mode 100644 index 0000000000..ea4b5518cb --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-width-3.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - 'table\.cell\(stroke: \(bottom: \(thickness: 2.25pt\), left: \(thickness: 3.75pt\), right: \(thickness: 3.75pt\), top: \(thickness: 0.75pt\)\)\)\[A\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-width-cm.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-width-cm.qmd new file mode 100644 index 0000000000..360d0107cb --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-width-cm.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - 'table\.cell\(stroke: \(thickness: 0.21cm\)\)\[A\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-width-ex.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-width-ex.qmd new file mode 100644 index 0000000000..910b76007f --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-width-ex.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: -1 + comment: "no analog in typst" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - ' \[A\], \[B\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-width-in.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-width-in.qmd new file mode 100644 index 0000000000..47e5bd34b9 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-width-in.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - 'table\.cell\(stroke: \(thickness: 0.04in\)\)\[A\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-width-invalid.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-width-invalid.qmd new file mode 100644 index 0000000000..5bd9853c8d --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-width-invalid.qmd @@ -0,0 +1,32 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - '\[A\], \[B\]' + - + - 'table\.cell' +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-width-mm.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-width-mm.qmd new file mode 100644 index 0000000000..8011a10e29 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-width-mm.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - 'table\.cell\(stroke: \(thickness: 1.7mm\)\)\[A\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-width-rem.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-width-rem.qmd new file mode 100644 index 0000000000..9e63616d46 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-width-rem.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: -1 + comment: "no analog in typst (?)" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - ' \[A\], \[B\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-width-rpx.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-width-rpx.qmd new file mode 100644 index 0000000000..16665d78fd --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/border-width-rpx.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: -1 + pdf: + quality: na + typst: + quality: -1 + comment: "invalid" + dashboard: + quality: -1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - ' \[A\], \[B\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/border/document.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/document.qmd new file mode 100644 index 0000000000..06ff885d08 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/border/document.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 1 + comment: "td only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - 'table\.cell\(stroke: \(right: \(paint: black, thickness: 1.5pt\)\)\)\[A\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/color/color-fuchsia.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/color/color-fuchsia.qmd new file mode 100644 index 0000000000..99cf9d49e5 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/color/color-fuchsia.qmd @@ -0,0 +1,32 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td, span only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + # note css fuchsia #f012be is not the same as css fuchsia #ff00ff + - '\[#set text\(fill: fuchsia\); B\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/color/color-invalid.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/color/color-invalid.qmd new file mode 100644 index 0000000000..5e82f254b0 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/color/color-invalid.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td, span only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - '\[B\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/color/color-magenta.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/color/color-magenta.qmd new file mode 100644 index 0000000000..71585f9463 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/color/color-magenta.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td, span only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - '\[#set text\(fill: rgb\(255, 0, 255\)\); B\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/color/color-mediumseagreen.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/color/color-mediumseagreen.qmd new file mode 100644 index 0000000000..366d2196c1 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/color/color-mediumseagreen.qmd @@ -0,0 +1,32 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td, span only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + + - + - '\[#set text\(fill: rgb\(60, 179, 113\)\); B\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/color/color-rgb-hex.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/color/color-rgb-hex.qmd new file mode 100644 index 0000000000..d254c5eec5 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/color/color-rgb-hex.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td, span only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - '\[#set text\(fill: rgb\("#000066"\)\); B\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/color/color-transparent.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/color/color-transparent.qmd new file mode 100644 index 0000000000..1a1e0a07cf --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/color/color-transparent.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td, span only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - '\[#set text\(fill: rgb\(0, 0, 0, 0%\)\); B\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/color/document.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/color/document.qmd new file mode 100644 index 0000000000..58aa758687 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/color/document.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td, span only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - '\[#set text\(fill: maroon\); B\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/font-family/document.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/font-family/document.qmd new file mode 100644 index 0000000000..095855317b --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/font-family/document.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "table only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - '#set text\(font: \("Georgia", "serif"\)\); #table\(' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/font-size/cell-percentage.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/font-size/cell-percentage.qmd new file mode 100644 index 0000000000..8ff3c17d2f --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/font-size/cell-percentage.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "table and table cell only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - '\[#set text\(size: 0.8em\); B\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/font-size/document.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/font-size/document.qmd new file mode 100644 index 0000000000..5f5d256246 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/font-size/document.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "table and table cell only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - 'align\(center\)\[#set text\(size: 6pt\); #table\(' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/document.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/document.qmd new file mode 100644 index 0000000000..be2140439d --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/document.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td, span only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - '\[#set text\(fill: rgb\("#85144b7f"\)\); B\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-mediumseagreen.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-mediumseagreen.qmd new file mode 100644 index 0000000000..669fabf0a7 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-mediumseagreen.qmd @@ -0,0 +1,32 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td, span only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + + - + - '\[#set text\(fill: rgb\(60, 179, 113, 50%\)\); B\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-nocolor.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-nocolor.qmd new file mode 100644 index 0000000000..de52a2db1c --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-nocolor.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td, span only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - '\[#set text\(fill: rgb\(0, 0, 0, 50%\)\); B\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-one.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-one.qmd new file mode 100644 index 0000000000..f443d9643c --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-one.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td, span only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - '\[#set text\(fill: rgb\(0, 0, 0, 100%\)\); B\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-comma-alpha-fraction.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-comma-alpha-fraction.qmd new file mode 100644 index 0000000000..36df23baaa --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-comma-alpha-fraction.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td, span only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - '\[#set text\(fill: rgb\(70, 130, 180, 17%\)\); B\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-comma-alpha-int.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-comma-alpha-int.qmd new file mode 100644 index 0000000000..3b23fb1eff --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-comma-alpha-int.qmd @@ -0,0 +1,32 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td, span only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + # note the input is invalid, there is no "int alpha" input for rgb() in css + - '\[#set text\(fill: rgb\(70, 130, 180, 50%\)\); B\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-comma-alpha-percent.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-comma-alpha-percent.qmd new file mode 100644 index 0000000000..af491fd07d --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-comma-alpha-percent.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td, span only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - '\[#set text\(fill: rgb\(70, 130, 180, 30%\)\); B\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-comma-percent-alpha.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-comma-percent-alpha.qmd new file mode 100644 index 0000000000..208d426507 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-comma-percent-alpha.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td, span only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - '\[#set text\(fill: rgb\(94%, 42%, 0%, 37.5%\)\); B\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-comma-percent.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-comma-percent.qmd new file mode 100644 index 0000000000..315c3128c3 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-comma-percent.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td, span only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - '\[#set text\(fill: rgb\(90%, 85%, 30%, 50%\)\); B\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-comma.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-comma.qmd new file mode 100644 index 0000000000..d85fef961f --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-comma.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td, span only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - '\[#set text\(fill: rgb\(70, 130, 180, 50%\)\); B\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-hex-alpha.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-hex-alpha.qmd new file mode 100644 index 0000000000..2491bd8e2a --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-hex-alpha.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td, span only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - '\[#set text\(fill: rgb\("#4682b440"\)\); B\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-hex.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-hex.qmd new file mode 100644 index 0000000000..c3b3b416c3 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-hex.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td, span only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - '\[#set text\(fill: rgb\("#4682b47f"\)\); B\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-shorthex-alpha.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-shorthex-alpha.qmd new file mode 100644 index 0000000000..3ef612801d --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-shorthex-alpha.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td, span only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - '\[#set text\(fill: rgb\("#c1d4"\)\); B\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-shorthex.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-shorthex.qmd new file mode 100644 index 0000000000..e7560680d5 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-shorthex.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td, span only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - '\[#set text\(fill: rgb\("#c1d7"\)\); B\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-space-alpha-fraction.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-space-alpha-fraction.qmd new file mode 100644 index 0000000000..b372d396bd --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-space-alpha-fraction.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td, span only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - '\[#set text\(fill: rgb\(70, 130, 180, 45%\)\); B\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-space-alpha-percent.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-space-alpha-percent.qmd new file mode 100644 index 0000000000..8c7bc367c8 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-space-alpha-percent.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "table cell only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - '\[#set text\(fill: rgb\(70, 130, 180, 42%\)\); B\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-space-percent-alpha-fraction.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-space-percent-alpha-fraction.qmd new file mode 100644 index 0000000000..0a45f594bb --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-space-percent-alpha-fraction.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "table cell only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - '\[#set text\(fill: rgb\(94%, 42%, 0%, 36%\)\); B\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-space-percent-alpha-none.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-space-percent-alpha-none.qmd new file mode 100644 index 0000000000..04d0164793 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-space-percent-alpha-none.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "table cell only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - '\[#set text\(fill: rgb\(94%, 42%, 0%, 50%\)\); B\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-space-percent-alpha-percent.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-space-percent-alpha-percent.qmd new file mode 100644 index 0000000000..2da64581d6 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-space-percent-alpha-percent.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "table cell only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - '\[#set text\(fill: rgb\(94%, 42%, 0%, 42%\)\); B\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-space-percent.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-space-percent.qmd new file mode 100644 index 0000000000..2c477f8ee2 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-space-percent.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "table cell only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - '\[#set text\(fill: rgb\(94%, 42%, 0%, 50%\)\); B\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-space.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-space.qmd new file mode 100644 index 0000000000..46f078b3ff --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-rgb-space.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "table cell only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - '\[#set text\(fill: rgb\(70, 130, 180, 50%\)\); B\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-span.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-span.qmd new file mode 100644 index 0000000000..2f23eada3c --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-span.qmd @@ -0,0 +1,27 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "td and span only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - '\[dis\]#text\(fill: rgb\(0, 0, 0, 30%\)\)\[appe\]#text\(fill: rgb\(0, 0, 0, 20%\)\)' + - [] +--- +This text [is progressively]{style="opacity: 50%"} [dis]{style="opacity: 40%"}[appe]{style="opacity: 30%"}[ar]{style="opacity: 20%"}[in]{style="opacity: 10%"}[g.]{style="opacity: 0%"} + +Note [that there is [no opacity *filter* in Typst, [so we just apply it to the alpha of the text color. [So nesting [opacities do not [accumulate in Typst.]{style="opacity: 50%"}]{style="opacity: 50%"}]{style="opacity: 50%"}]{style="opacity: 50%"}]{style="opacity: 50%"}]{style="opacity: 50%"} \ No newline at end of file diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/vertical-align/document.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/vertical-align/document.qmd new file mode 100644 index 0000000000..262f8c98e8 --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/vertical-align/document.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "table cell only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - 'table.cell\(align: horizon\)\[B\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/css-properties/vertical-align/text-align.qmd b/dev-docs/feature-format-matrix/qmd-files/css-properties/vertical-align/text-align.qmd new file mode 100644 index 0000000000..46e4159d5a --- /dev/null +++ b/dev-docs/feature-format-matrix/qmd-files/css-properties/vertical-align/text-align.qmd @@ -0,0 +1,31 @@ +--- +format: + html: + quality: 1 + pdf: + quality: na + typst: + quality: 2 + comment: "table cell only" + dashboard: + quality: 1 + docx: + quality: na + pptx: + quality: na +keep-typ: true +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - 'table.cell\(align: horizon \+ right\)\[B\]' + - [] +--- + +```{=html} + + +
AB
+``` + diff --git a/dev-docs/feature-format-matrix/qmd-files/image/alt-text/document.qmd b/dev-docs/feature-format-matrix/qmd-files/image/alt-text/document.qmd index 09ce4f5c5e..611f88a0cb 100644 --- a/dev-docs/feature-format-matrix/qmd-files/image/alt-text/document.qmd +++ b/dev-docs/feature-format-matrix/qmd-files/image/alt-text/document.qmd @@ -9,7 +9,7 @@ _quarto: tests: html: &html_like_tests ensureHtmlElements: - - ['div#case1 img[alt="Alt"]', + - ['div#case1 img[alt="Alt"]', 'img#case2[alt="Alt"]', 'div#fig-case3 img[alt="Alt"]', 'div#fig-case4 img[alt="Alt"]', @@ -23,23 +23,23 @@ _quarto: With caption, becomes a pandoc.Figure, but not a float: -![Caption](https://placeholder.co/400/400){#case1 fig-alt="Alt"} +![Caption]({{< placeholder 400 >}}){#case1 fig-alt="Alt"} Without caption, it's simply an image: -![](https://placeholder.co/400/400){#case2 fig-alt="Alt"} +![]({{< placeholder 400 >}}){#case2 fig-alt="Alt"} In crossreferenceable figures, with and without captions: -![Caption](https://placeholder.co/400/400){#fig-case3 fig-alt="Alt"} +![Caption]({{< placeholder 400 >}}){#fig-case3 fig-alt="Alt"} -![](https://placeholder.co/400/400){#fig-case4 fig-alt="Alt"} +![]({{< placeholder 400 >}}){#fig-case4 fig-alt="Alt"} In crossreferenceable non-figure floats, with and without captions: -![Caption](https://placeholder.co/400/400){#tbl-case5 fig-alt="Alt"} +![Caption]({{< placeholder 400 >}}){#tbl-case5 fig-alt="Alt"} -![](https://placeholder.co/400/400){#tbl-case6 fig-alt="Alt"} +![]({{< placeholder 400 >}}){#tbl-case6 fig-alt="Alt"} diff --git a/dev-docs/feature-format-matrix/qmd-files/layout/fig-align/code-python-caption.qmd b/dev-docs/feature-format-matrix/qmd-files/layout/fig-align/code-python-caption.qmd index 7d6dca12ab..86313d1800 100644 --- a/dev-docs/feature-format-matrix/qmd-files/layout/fig-align/code-python-caption.qmd +++ b/dev-docs/feature-format-matrix/qmd-files/layout/fig-align/code-python-caption.qmd @@ -17,10 +17,13 @@ _quarto: tests: typst: ensureTypstFileRegexMatches: - - - - "#align\\(right\\)\\[(\r\n?|\n)#box" - - - - "#block\\[(\r\n?|\n)#align\\(right\\)\\[" + - [] + - [] + # testable but not working yet + # - + # - "#align\\(right\\)\\[(\r\n?|\n)#box" + # - + # - "#block\\[(\r\n?|\n)#align\\(right\\)\\[" --- diff --git a/dev-docs/feature-format-matrix/qmd-files/layout/fig-align/code-r-caption.qmd b/dev-docs/feature-format-matrix/qmd-files/layout/fig-align/code-r-caption.qmd index 9a669ebbdc..dacd8e4cb6 100644 --- a/dev-docs/feature-format-matrix/qmd-files/layout/fig-align/code-r-caption.qmd +++ b/dev-docs/feature-format-matrix/qmd-files/layout/fig-align/code-r-caption.qmd @@ -17,10 +17,13 @@ _quarto: tests: typst: ensureTypstFileRegexMatches: - - - - "#align\\(right\\)\\[(\r\n?|\n)#box" - - - - "#block\\[(\r\n?|\n)#align\\(right\\)\\[" + - [] + - [] + # testable but not working yet + # - + # - "#align\\(right\\)\\[(\r\n?|\n)#box" + # - + # - "#block\\[(\r\n?|\n)#align\\(right\\)\\[" --- ```{r} diff --git a/dev-docs/feature-format-matrix/qmd-files/layout/fig-align/toplevel-id-caption.qmd b/dev-docs/feature-format-matrix/qmd-files/layout/fig-align/toplevel-id-caption.qmd index 9989b414a0..a47ff09a48 100644 --- a/dev-docs/feature-format-matrix/qmd-files/layout/fig-align/toplevel-id-caption.qmd +++ b/dev-docs/feature-format-matrix/qmd-files/layout/fig-align/toplevel-id-caption.qmd @@ -22,10 +22,13 @@ _quarto: - [] typst: ensureTypstFileRegexMatches: - - - - "#align\\(right\\)\\[(\r\n?|\n)#box" - - - - "#block\\[(\r\n?|\n)#align\\(right\\)\\[" + - [] + - [] + # testable but not working yet + # - + # - "#align\\(right\\)\\[(\r\n?|\n)#box" + # - + # - "#block\\[(\r\n?|\n)#align\\(right\\)\\[" --- ![caption](100.png){#fig-1 fig-align="right"} diff --git a/dev-docs/feature-format-matrix/qmd-files/layout/fig-align/toplevel-id-nocaption.qmd b/dev-docs/feature-format-matrix/qmd-files/layout/fig-align/toplevel-id-nocaption.qmd index 07d1bc6b39..d3ab98e3dd 100644 --- a/dev-docs/feature-format-matrix/qmd-files/layout/fig-align/toplevel-id-nocaption.qmd +++ b/dev-docs/feature-format-matrix/qmd-files/layout/fig-align/toplevel-id-nocaption.qmd @@ -22,10 +22,13 @@ _quarto: - [] typst: ensureTypstFileRegexMatches: - - - - "#align\\(right\\)\\[(\r\n?|\n)#box" - - - - "#block\\[(\r\n?|\n)#align\\(right\\)\\[" + - [] + - [] + # testable but not working yet + # - + # - "#align\\(right\\)\\[(\r\n?|\n)#box" + # - + # - "#block\\[(\r\n?|\n)#align\\(right\\)\\[" --- ![](100.png){#fig-1 fig-align="right"} diff --git a/dev-docs/feature-format-matrix/qmd-files/layout/fig-align/toplevel-noid-caption.qmd b/dev-docs/feature-format-matrix/qmd-files/layout/fig-align/toplevel-noid-caption.qmd index 73df197819..3577ea4a20 100644 --- a/dev-docs/feature-format-matrix/qmd-files/layout/fig-align/toplevel-noid-caption.qmd +++ b/dev-docs/feature-format-matrix/qmd-files/layout/fig-align/toplevel-noid-caption.qmd @@ -17,10 +17,13 @@ _quarto: tests: typst: ensureTypstFileRegexMatches: - - - - "#align\\(right\\)\\[(\r\n?|\n)#box" - - - - "#block\\[(\r\n?|\n)#align\\(right\\)\\[" + - [] + - [] + # testable but not working yet + # - + # - "#align\\(right\\)\\[(\r\n?|\n)#box" + # - + # - "#block\\[(\r\n?|\n)#align\\(right\\)\\[" --- ![caption](100.png){fig-align="right"} diff --git a/package/scripts/deno_std/deno_std.ts b/package/scripts/deno_std/deno_std.ts index 2c2dc03dd6..54eaf74bbf 100644 --- a/package/scripts/deno_std/deno_std.ts +++ b/package/scripts/deno_std/deno_std.ts @@ -76,6 +76,7 @@ import * as semver from "https://deno.land/std@0.217.0/semver/mod.ts"; import * as streams from "https://deno.land/std@0.217.0/streams/mod.ts"; import * as uuid from "https://deno.land/std@0.217.0/uuid/mod.ts"; import * as version from "https://deno.land/std@0.217.0/version.ts"; +import juice from "https://cdn.skypack.dev/juice@10.0.0"; /* diff --git a/src/dev_import_map.json b/src/dev_import_map.json index d7ba66e7bb..ab018ac19d 100644 --- a/src/dev_import_map.json +++ b/src/dev_import_map.json @@ -62,6 +62,7 @@ "https://dev.jspm.io/": "./vendor/../resources/vendor/dev-jspm-io/", "https://dev.jspm.io/jszip@3.5.0": "./vendor/../resources/vendor/dev-jspm-io/jszip@3.5.0.js", "puppeteer/": "./vendor/../resources/vendor/deno-land/x/puppeteer@9-0-2/", + "https://cdn.skypack.dev/juice@10.0.0": "./vendor/cdn.skypack.dev/juice@10.0.0.js", "io/write_all.ts": "./vendor/deno.land/std@0.217.0/io/write_all.ts", "cliffy/command/mod.ts": "./vendor/deno.land/x/cliffy@v1.0.0-rc.3/command/mod.ts", "semver/mod.ts": "./vendor/deno.land/x/semver@v1.4.0/mod.ts", @@ -287,8 +288,27 @@ "/-/acorn-walk@v7.2.0-HE7wS37ePcNncqJvsD8k/dist=es2019,mode=imports/optimized/acorn-walk.js": "./vendor/cdn.skypack.dev/-/acorn-walk@v7.2.0-HE7wS37ePcNncqJvsD8k/dist=es2019,mode=imports/optimized/acorn-walk.js", "/-/acorn-private-class-elements@v1.0.0-74UyKouPfmJKyVmXndKD/dist=es2019,mode=imports/optimized/acorn-private-class-elements.js": "./vendor/cdn.skypack.dev/-/acorn-private-class-elements@v1.0.0-74UyKouPfmJKyVmXndKD/dist=es2019,mode=imports/optimized/acorn-private-class-elements.js", "/-/acorn@v8.4.0-TUBEehokUmfefnUMjao9/dist=es2019,mode=imports/optimized/acorn.js": "./vendor/cdn.skypack.dev/-/acorn@v8.4.0-TUBEehokUmfefnUMjao9/dist=es2019,mode=imports/optimized/acorn.js", + "/-/css-what@v6.1.0-wTvp3wF3BRcbbnFpaqAF/dist=es2019,mode=imports/optimized/css-what.js": "./vendor/cdn.skypack.dev/-/css-what@v6.1.0-wTvp3wF3BRcbbnFpaqAF/dist=es2019,mode=imports/optimized/css-what.js", + "/-/css-select@v5.1.0-lzo7kuDagEAqaWVyUzkG/dist=es2019,mode=imports/optimized/css-select.js": "./vendor/cdn.skypack.dev/-/css-select@v5.1.0-lzo7kuDagEAqaWVyUzkG/dist=es2019,mode=imports/optimized/css-select.js", + "/-/domutils@v3.0.1-AxLWD9jG78wB01z8Pizf/dist=es2019,mode=imports/optimized/domutils.js": "./vendor/cdn.skypack.dev/-/domutils@v3.0.1-AxLWD9jG78wB01z8Pizf/dist=es2019,mode=imports/optimized/domutils.js", + "/-/boolbase@v1.0.0-VOm51i7l8eNaWy5whtPS/dist=es2019,mode=imports/optimized/boolbase.js": "./vendor/cdn.skypack.dev/-/boolbase@v1.0.0-VOm51i7l8eNaWy5whtPS/dist=es2019,mode=imports/optimized/boolbase.js", + "/-/domhandler@v5.0.3-oHQ1zBLd64RIysV9PvVR/dist=es2019,mode=imports/optimized/domhandler.js": "./vendor/cdn.skypack.dev/-/domhandler@v5.0.3-oHQ1zBLd64RIysV9PvVR/dist=es2019,mode=imports/optimized/domhandler.js", + "/-/parse5@v7.0.0-4AUKIZfwEPUbwYAbyTrt/dist=es2019,mode=imports/optimized/parse5.js": "./vendor/cdn.skypack.dev/-/parse5@v7.0.0-4AUKIZfwEPUbwYAbyTrt/dist=es2019,mode=imports/optimized/parse5.js", + "/-/parse5-htmlparser2-tree-adapter@v7.0.0-Yds3pDou8tm4yIHAlVGV/dist=es2019,mode=imports/optimized/parse5-htmlparser2-tree-adapter.js": "./vendor/cdn.skypack.dev/-/parse5-htmlparser2-tree-adapter@v7.0.0-Yds3pDou8tm4yIHAlVGV/dist=es2019,mode=imports/optimized/parse5-htmlparser2-tree-adapter.js", + "/-/dom-serializer@v2.0.0-0QgVINP0DwZRFE7238Nk/dist=es2019,mode=imports/optimized/dom-serializer.js": "./vendor/cdn.skypack.dev/-/dom-serializer@v2.0.0-0QgVINP0DwZRFE7238Nk/dist=es2019,mode=imports/optimized/dom-serializer.js", + "/-/htmlparser2@v8.0.1-5ZdnwUWrSTqKCARDEeGB/dist=es2019,mode=imports/optimized/htmlparser2.js": "./vendor/cdn.skypack.dev/-/htmlparser2@v8.0.1-5ZdnwUWrSTqKCARDEeGB/dist=es2019,mode=imports/optimized/htmlparser2.js", + "/-/cheerio-select@v2.1.0-3jQ9aaXMWR0anNb0rdBs/dist=es2019,mode=imports/optimized/cheerio-select.js": "./vendor/cdn.skypack.dev/-/cheerio-select@v2.1.0-3jQ9aaXMWR0anNb0rdBs/dist=es2019,mode=imports/optimized/cheerio-select.js", + "/-/nth-check@v2.0.1-2f5siX0mso3eC2ZgQX1j/dist=es2019,mode=imports/optimized/nth-check.js": "./vendor/cdn.skypack.dev/-/nth-check@v2.0.1-2f5siX0mso3eC2ZgQX1j/dist=es2019,mode=imports/optimized/nth-check.js", + "/-/domelementtype@v2.3.0-PrmNUNoEHMqortEMiiky/dist=es2019,mode=imports/optimized/domelementtype.js": "./vendor/cdn.skypack.dev/-/domelementtype@v2.3.0-PrmNUNoEHMqortEMiiky/dist=es2019,mode=imports/optimized/domelementtype.js", + "/-/entities@v4.2.0-t42Wo66cVV1L2FcPgERr/dist=es2019,mode=imports/optimized/entities.js": "./vendor/cdn.skypack.dev/-/entities@v4.2.0-t42Wo66cVV1L2FcPgERr/dist=es2019,mode=imports/optimized/entities.js", + "/-/domhandler@v5.0.2-qvBtZhQ6wRKNZJnPd1dK/dist=es2019,mode=imports/optimized/domhandler.js": "./vendor/cdn.skypack.dev/-/domhandler@v5.0.2-qvBtZhQ6wRKNZJnPd1dK/dist=es2019,mode=imports/optimized/domhandler.js", "/-/xspattern@v3.1.0-ChOssaTvtX8cZQgPaNnM/dist=es2019,mode=imports/optimized/xspattern.js": "./vendor/cdn.skypack.dev/-/xspattern@v3.1.0-ChOssaTvtX8cZQgPaNnM/dist=es2019,mode=imports/optimized/xspattern.js", "/-/prsc@v4.0.0-yiYip3qo0YwPataeg654/dist=es2019,mode=imports/optimized/prsc.js": "./vendor/cdn.skypack.dev/-/prsc@v4.0.0-yiYip3qo0YwPataeg654/dist=es2019,mode=imports/optimized/prsc.js", + "/-/entities@v4.3.0-V4vIlnoYfSBRg1gj9BOL/dist=es2019,mode=imports/optimized/entities/lib/decode.js": "./vendor/cdn.skypack.dev/-/entities@v4.3.0-V4vIlnoYfSBRg1gj9BOL/dist=es2019,mode=imports/optimized/entities/lib/decode.js", + "/-/cheerio@v1.0.0-rc.12-d2orEfV7mEyxhcmv8Jbn/dist=es2019,mode=imports/optimized/cheerio.js": "./vendor/cdn.skypack.dev/-/cheerio@v1.0.0-rc.12-d2orEfV7mEyxhcmv8Jbn/dist=es2019,mode=imports/optimized/cheerio.js", + "/-/mensch@v0.3.4-bYdFVPGjq4ZCCd5bQOiD/dist=es2019,mode=imports/optimized/mensch.js": "./vendor/cdn.skypack.dev/-/mensch@v0.3.4-bYdFVPGjq4ZCCd5bQOiD/dist=es2019,mode=imports/optimized/mensch.js", + "/-/slick@v1.12.2-aV7vJdJVxGxCoP6YSykY/dist=es2019,mode=imports/unoptimized/parser.js": "./vendor/cdn.skypack.dev/-/slick@v1.12.2-aV7vJdJVxGxCoP6YSykY/dist=es2019,mode=imports/unoptimized/parser.js", + "/-/entities@v4.3.0-V4vIlnoYfSBRg1gj9BOL/dist=es2019,mode=imports/optimized/entities/lib/escape.js": "./vendor/cdn.skypack.dev/-/entities@v4.3.0-V4vIlnoYfSBRg1gj9BOL/dist=es2019,mode=imports/optimized/entities/lib/escape.js", "/-/whynot@v5.0.0-TIWeI93neceQKiPCfmA6/dist=es2019,mode=imports/optimized/whynot.js": "./vendor/cdn.skypack.dev/-/whynot@v5.0.0-TIWeI93neceQKiPCfmA6/dist=es2019,mode=imports/optimized/whynot.js", "/-/@observablehq/parser@v4.5.0-rWZiNfab8flhVomtfVvr/dist=es2019,mode=imports/optimized/@observablehq/parser.js": "./vendor/cdn.skypack.dev/-/@observablehq/parser@v4.5.0-rWZiNfab8flhVomtfVvr/dist=es2019,mode=imports/optimized/@observablehq/parser.js", "/-/acorn-class-fields@v1.0.0-VEggkLxq9gMrdwRuKkzZ/dist=es2019,mode=imports/optimized/acorn-class-fields.js": "./vendor/cdn.skypack.dev/-/acorn-class-fields@v1.0.0-VEggkLxq9gMrdwRuKkzZ/dist=es2019,mode=imports/optimized/acorn-class-fields.js", @@ -298,6 +318,7 @@ "/-/blueimp-md5@v2.19.0-FsBtHB6ITwdC3L5Giq4Q/dist=es2019,mode=imports/optimized/blueimp-md5.js": "./vendor/cdn.skypack.dev/-/blueimp-md5@v2.19.0-FsBtHB6ITwdC3L5Giq4Q/dist=es2019,mode=imports/optimized/blueimp-md5.js", "/-/dayjs@v1.8.21-6syVEc6qGP8frQXKlmJD/dist=es2019,mode=imports/optimized/dayjs.js": "./vendor/cdn.skypack.dev/-/dayjs@v1.8.21-6syVEc6qGP8frQXKlmJD/dist=es2019,mode=imports/optimized/dayjs.js", "/-/fontoxpath@v3.29.1-a0ohYsVP957eLX7RfgAa/dist=es2019,mode=imports/optimized/fontoxpath.js": "./vendor/cdn.skypack.dev/-/fontoxpath@v3.29.1-a0ohYsVP957eLX7RfgAa/dist=es2019,mode=imports/optimized/fontoxpath.js", + "/-/juice@v10.0.0-FUuj4gsVBIZ9bgC3rRoH/dist=es2019,mode=imports/optimized/juice.js": "./vendor/cdn.skypack.dev/-/juice@v10.0.0-FUuj4gsVBIZ9bgC3rRoH/dist=es2019,mode=imports/optimized/juice.js", "/-/lodash@v4.17.21-K6GEbP02mWFnLA45zAmi/dist=es2019,mode=imports/unoptimized/cloneDeep.js": "./vendor/cdn.skypack.dev/-/lodash@v4.17.21-K6GEbP02mWFnLA45zAmi/dist=es2019,mode=imports/unoptimized/cloneDeep.js", "/-/lodash@v4.17.21-K6GEbP02mWFnLA45zAmi/dist=es2019,mode=imports/unoptimized/debounce.js": "./vendor/cdn.skypack.dev/-/lodash@v4.17.21-K6GEbP02mWFnLA45zAmi/dist=es2019,mode=imports/unoptimized/debounce.js", "/-/lodash@v4.17.21-K6GEbP02mWFnLA45zAmi/dist=es2019,mode=imports/unoptimized/difference.js": "./vendor/cdn.skypack.dev/-/lodash@v4.17.21-K6GEbP02mWFnLA45zAmi/dist=es2019,mode=imports/unoptimized/difference.js", diff --git a/src/resources/deno_std/deno_std.lock b/src/resources/deno_std/deno_std.lock index 619cba7713..341a7f6cce 100644 --- a/src/resources/deno_std/deno_std.lock +++ b/src/resources/deno_std/deno_std.lock @@ -1,6 +1,31 @@ { "version": "3", "remote": { + "https://cdn.skypack.dev/-/boolbase@v1.0.0-VOm51i7l8eNaWy5whtPS/dist=es2019,mode=imports/optimized/boolbase.js": "4940121004d9361cc93959178e9aed3ab5bf31a576ab4d39d1e757efb7bd3270", + "https://cdn.skypack.dev/-/cheerio-select@v2.1.0-3jQ9aaXMWR0anNb0rdBs/dist=es2019,mode=imports/optimized/cheerio-select.js": "2e2c8d8d6e03462999dd804f0f773a4ac829c4bfdbcf0090237015fc17aac18b", + "https://cdn.skypack.dev/-/cheerio@v1.0.0-rc.12-d2orEfV7mEyxhcmv8Jbn/dist=es2019,mode=imports/optimized/cheerio.js": "c33cf2e17d45ef677c0d875eec1c9418fbfbe5bca8c0b4c75cce5f0310cc8068", + "https://cdn.skypack.dev/-/cheerio@v1.0.0-rc.12-d2orEfV7mEyxhcmv8Jbn/dist=es2019,mode=imports/optimized/cheerio/lib/utils.js": "334eefa18f525607f76b3c376fdb8620ad44812ba85d23c3fc50ffdee2312591", + "https://cdn.skypack.dev/-/cheerio@v1.0.0-rc.12-d2orEfV7mEyxhcmv8Jbn/dist=es2019,mode=imports/optimized/common/load-4922a70c.js": "ea721bdfbd5a2b2e01d3eabfb6b22fe4b624cf9ae84023a8230ff265f8e5ad71", + "https://cdn.skypack.dev/-/css-select@v5.1.0-lzo7kuDagEAqaWVyUzkG/dist=es2019,mode=imports/optimized/css-select.js": "b07c810252c72f1fd6baa4cab19a215d2591770d8aa64462af497eeb309a140d", + "https://cdn.skypack.dev/-/css-what@v6.1.0-wTvp3wF3BRcbbnFpaqAF/dist=es2019,mode=imports/optimized/css-what.js": "4c9ccab1a99452ffa4807903c60c8b708d7f443232a25f53c97447b247b284e7", + "https://cdn.skypack.dev/-/dom-serializer@v2.0.0-0QgVINP0DwZRFE7238Nk/dist=es2019,mode=imports/optimized/dom-serializer.js": "dc85ab2b45768d36455f9d25af7b5b7a953dfad27e29bc3198b2aa49ec4f7e54", + "https://cdn.skypack.dev/-/domelementtype@v2.3.0-PrmNUNoEHMqortEMiiky/dist=es2019,mode=imports/optimized/domelementtype.js": "c76f161d2800c2aa1ba03741d35a2935291b225fc59cbaa15bfc669f6becde49", + "https://cdn.skypack.dev/-/domhandler@v5.0.2-qvBtZhQ6wRKNZJnPd1dK/dist=es2019,mode=imports/optimized/domhandler.js": "4ec6affc98e450c56ae741ba3b3f3c04c5d88cae4b08bb64fd3096ab2ba5c4f5", + "https://cdn.skypack.dev/-/domhandler@v5.0.3-oHQ1zBLd64RIysV9PvVR/dist=es2019,mode=imports/optimized/domhandler.js": "4ec6affc98e450c56ae741ba3b3f3c04c5d88cae4b08bb64fd3096ab2ba5c4f5", + "https://cdn.skypack.dev/-/domutils@v3.0.1-AxLWD9jG78wB01z8Pizf/dist=es2019,mode=imports/optimized/domutils.js": "761500899cc80c09524f905c344f63ecd42bdd3997554a3ed026e851b2aabe6d", + "https://cdn.skypack.dev/-/entities@v4.2.0-t42Wo66cVV1L2FcPgERr/dist=es2019,mode=imports/optimized/entities.js": "2d8104083e415a8a64ac570887969694f5b1e2d3f790c1d16c931fa332623712", + "https://cdn.skypack.dev/-/entities@v4.2.0-t42Wo66cVV1L2FcPgERr/dist=es2019,mode=imports/optimized/entities/lib/decode.js": "50abc6be1e1aa94ce64fc2523b92a4edd3560fc05d6b3e485d79ecf3d415819f", + "https://cdn.skypack.dev/-/entities@v4.3.0-V4vIlnoYfSBRg1gj9BOL/dist=es2019,mode=imports/optimized/entities/lib/decode.js": "dd84a854d62cc7ae8b6ee31a6a83a49b8b560e379f44a59b8b0a4e9a883e72d8", + "https://cdn.skypack.dev/-/entities@v4.3.0-V4vIlnoYfSBRg1gj9BOL/dist=es2019,mode=imports/optimized/entities/lib/escape.js": "77a8cdaf34edd3f1808bf207f8eb174d7836fa354f3a2359eb1f867981e44230", + "https://cdn.skypack.dev/-/htmlparser2@v8.0.1-5ZdnwUWrSTqKCARDEeGB/dist=es2019,mode=imports/optimized/common/Parser-5b65a52d.js": "799693691b40d5d4ed02db4121ae4ae226d0283620d7e8c0a199bbab9b330e2f", + "https://cdn.skypack.dev/-/htmlparser2@v8.0.1-5ZdnwUWrSTqKCARDEeGB/dist=es2019,mode=imports/optimized/htmlparser2.js": "46317a93c154d7cb1fa19c6a100a2a1f70c40fa6e11152b339712f294d7c8f9c", + "https://cdn.skypack.dev/-/juice@v10.0.0-FUuj4gsVBIZ9bgC3rRoH/dist=es2019,mode=imports/optimized/juice.js": "9fc4edd0c794056d1534e877d8ade4d5857cdc049cb9f8f1705d76bc3fab040b", + "https://cdn.skypack.dev/-/mensch@v0.3.4-bYdFVPGjq4ZCCd5bQOiD/dist=es2019,mode=imports/optimized/mensch.js": "cfb25d05642041c70afd2641c659b480922b8f039276979abc9e833bc5777e7c", + "https://cdn.skypack.dev/-/nth-check@v2.0.1-2f5siX0mso3eC2ZgQX1j/dist=es2019,mode=imports/optimized/nth-check.js": "45b0ca0b9f1522b53b966d271456772c23d103f0852107081976e35284662743", + "https://cdn.skypack.dev/-/parse5-htmlparser2-tree-adapter@v7.0.0-Yds3pDou8tm4yIHAlVGV/dist=es2019,mode=imports/optimized/parse5-htmlparser2-tree-adapter.js": "9b2fe059f0f91aefe9f09cfd1dd86ac435257db9e28295d6d8cf08d409be2ebb", + "https://cdn.skypack.dev/-/parse5@v7.0.0-4AUKIZfwEPUbwYAbyTrt/dist=es2019,mode=imports/optimized/parse5.js": "447947031671020d86edfd828d5cb913c4a6201c338a08302e961a10cbfeb579", + "https://cdn.skypack.dev/-/slick@v1.12.2-aV7vJdJVxGxCoP6YSykY/dist=es2019,mode=imports/unoptimized/parser.js": "5ab95fb4c0b8fd7bdff02ae6ab87b106f880b4f2b9b5bae56385718d8646f022", + "https://cdn.skypack.dev/juice@10.0.0": "4960ab57fe39afacdc72fb3377c9f8ed0939c7ade984a6709ec1f0f7824e2107", "https://deno.land/std@0.217.0/archive/_common.ts": "85edd5cdd4324833f613c1bc055f8e2f935cc9229c6b3044421268d9959997ef", "https://deno.land/std@0.217.0/archive/tar.ts": "71ffa23b34301f521c6b2d90923a11e7fe695854bca1332608ab0887870e08e1", "https://deno.land/std@0.217.0/assert/assert.ts": "bec068b2fccdd434c138a555b19a2c2393b71dfaada02b7d568a01541e67cdc5", diff --git a/src/resources/deno_std/run_import_map.json b/src/resources/deno_std/run_import_map.json index c885524f80..7722a32191 100644 --- a/src/resources/deno_std/run_import_map.json +++ b/src/resources/deno_std/run_import_map.json @@ -1,5 +1,6 @@ { "imports": { - "https://deno.land/std/": "https://deno.land/std@0.217.0/" + "https://deno.land/std/": "https://deno.land/std@0.217.0/", + "https://cdn.skypack.dev/juice": "https://cdn.skypack.dev/juice@10.0.0" } } diff --git a/src/resources/filters/layout/typst.lua b/src/resources/filters/layout/typst.lua index 1ce2349a63..94eb86874a 100644 --- a/src/resources/filters/layout/typst.lua +++ b/src/resources/filters/layout/typst.lua @@ -11,7 +11,7 @@ function make_typst_figure(tbl) local identifier = tbl.identifier local separator = tbl.separator - if #caption.content == 0 and tbl.separator == nil then + if (not caption or #caption.content == 0) and tbl.separator == nil then separator = "" end @@ -24,7 +24,7 @@ function make_typst_figure(tbl) pandoc.RawInline("typst", separator and ("separator: \"" .. separator .. "\", ") or ""), pandoc.RawInline("typst", "position: " .. caption_location .. ", "), pandoc.RawInline("typst", "["), - caption, + caption or pandoc.Inlines({}), -- apparently typst doesn't allow separate prefix and name pandoc.RawInline("typst", "]), "), pandoc.RawInline("typst", "kind: \"" .. kind .. "\", "), diff --git a/src/resources/filters/main.lua b/src/resources/filters/main.lua index ac1d15aaed..6b57fda6af 100644 --- a/src/resources/filters/main.lua +++ b/src/resources/filters/main.lua @@ -67,6 +67,7 @@ import("./quarto-post/gfm.lua") import("./quarto-post/ipynb.lua") import("./quarto-post/latex.lua") import("./quarto-post/typst.lua") +import("./quarto-post/typst-css-to-props.lua") import("./quarto-post/latexdiv.lua") import("./quarto-post/meta.lua") import("./quarto-post/ojs.lua") @@ -368,6 +369,7 @@ local quarto_post_filters = { { name = "post-render-html-fixups", filter = render_html_fixups() }, { name = "post-render-ipynb-fixups", filter = render_ipynb_fixups() }, { name = "post-render-typst-fixups", filter = render_typst_fixups() }, + { name = "post-render-typst-css-to-props", filter = render_typst_css_to_props() }, { name = "post-render-gfm-fixups", filter = render_gfm_fixups() }, { name = "post-render-hugo-fixups", filter = render_hugo_fixups() }, { name = "post-render-email", filters = render_email() }, diff --git a/src/resources/filters/modules/constants.lua b/src/resources/filters/modules/constants.lua index e1702c270c..6b1694681f 100644 --- a/src/resources/filters/modules/constants.lua +++ b/src/resources/filters/modules/constants.lua @@ -67,6 +67,7 @@ local kIncludeInHeader = "include-in-header" local kCopyright = "copyright" local kLicense = "license" local kHtmlTableProcessing = "html-table-processing" +local kHtmlPreTagProcessing = "html-pre-tag-processing" -- for a given language, the comment character(s) local kLangCommentChars = { @@ -197,5 +198,6 @@ return { kLangCommentChars = kLangCommentChars, kDefaultCodeAnnotationComment = kDefaultCodeAnnotationComment, - kHtmlTableProcessing = kHtmlTableProcessing + kHtmlTableProcessing = kHtmlTableProcessing, + kHtmlPreTagProcessing = kHtmlPreTagProcessing } diff --git a/src/resources/filters/modules/patterns.lua b/src/resources/filters/modules/patterns.lua index 24e65a25df..e82aef027a 100644 --- a/src/resources/filters/modules/patterns.lua +++ b/src/resources/filters/modules/patterns.lua @@ -21,6 +21,8 @@ end local html_table_tag_name = "[Tt][Aa][Bb][Ll][Ee]" local html_table = tag(html_table_tag_name) +local html_pre_tag_name = "[Pp][Rr][Ee]" +local html_pre_tag = tag(html_pre_tag_name) local html_table_caption = tag("[Cc][Aa][Pp][Tt][Ii][Oo][Nn]") local html_paged_table = "