-- version.lua -- the extension's version, read from _extension.yml. -- -- version = dofile(quarto.utils.resolve_path("version.lua")) -- -- Every html dependency of the filters takes it: Quarto copies a dependency to -- site_libs/quarto-contrib/-/, so each version bump is a new -- URL and a browser cannot go on serving a cached script or stylesheet from -- an older version. The number lives in one place, the `version:` line that -- is bumped anyway. local f = io.open(quarto.utils.resolve_path("_extension.yml"), "r") if not f then return "0" end local text = f:read("a") f:close() return ("\n" .. text):match("\nversion:%s*([%w.%-]+)") or "0"