Style inline raw text as compact pills
This commit is contained in:
parent
64c30968a2
commit
006d45c890
|
|
@ -84,7 +84,7 @@ are rejected, including legacy `diagnostics`, top-level `organization` and named
|
|||
Unknown or misspelled blocks fail validation. Text and commands are data, not code
|
||||
for the validator to execute. The renderer must preserve that boundary.
|
||||
Within a `text` block, balanced single backticks mark inline code, for example
|
||||
`` `5661ea1` ``. The renderer uses Typst's inline raw text for the marked span;
|
||||
`` `5661ea1` ``. The renderer shows Typst's inline raw text as a small rounded pill;
|
||||
unmatched backticks remain literal. This formatting never executes report text.
|
||||
Cards render as rounded, shaded panels. Omit `tone` for a neutral panel or set
|
||||
it to a severity token to tint its border and background. A card may contain
|
||||
|
|
|
|||
|
|
@ -91,6 +91,10 @@
|
|||
text(size: 7pt, fill: muted)[Page #counter(page).display()]))
|
||||
#set text(font: get(theme, "font", default: "DejaVu Sans"), size: 9.5pt, fill: ink)
|
||||
#set par(leading: 0.58em, spacing: 0.55em)
|
||||
#show raw.where(block: false): box.with(
|
||||
fill: soft, stroke: 0.5pt + line-color, radius: 3pt,
|
||||
inset: (x: 4pt, y: 1pt), outset: (y: 1pt),
|
||||
)
|
||||
|
||||
#text(size: 22pt, weight: "bold", fill: accent)[#as-text(report.title)]
|
||||
#if "subtitle" in report { v(3pt); text(size: 11pt, fill: muted)[#as-text(report.subtitle)] }
|
||||
|
|
|
|||
|
|
@ -107,8 +107,8 @@ class RenderTests(unittest.TestCase):
|
|||
renderer.render(input_path, output, TYPST)
|
||||
self.assert_pdf(output)
|
||||
if PDFTOTEXT:
|
||||
extracted = subprocess.check_output([PDFTOTEXT, str(output), "-"], text=True)
|
||||
self.assertIn("Pinned 5661ea1 and 5969196.", extracted)
|
||||
extracted = subprocess.check_output([PDFTOTEXT, "-layout", str(output), "-"], text=True)
|
||||
self.assertRegex(extracted, r"Pinned\s+5661ea1\s+and\s+5969196\s*\.")
|
||||
self.assertIn("Unmatched ` stays literal.", extracted)
|
||||
|
||||
def test_existing_output_requires_force_and_input_is_never_output(self):
|
||||
|
|
|
|||
Loading…
Reference in New Issue