Problem: presets that need the output path in their args function (markdown, github) had to recompute it inline, duplicating the same gsub expression already in the output field. Solution: resolve output_file first in M.compile, then extend ctx with output = output_file into a resolved_ctx before evaluating args and cwd. Presets can now reference ctx.output directly. Add output? to the preview.Context type annotation. |
||
|---|---|---|
| .. | ||
| commands_spec.lua | ||
| compiler_spec.lua | ||
| diagnostic_spec.lua | ||
| helpers.lua | ||
| init_spec.lua | ||
| minimal_init.lua | ||
| presets_spec.lua | ||