Esc

COMARK0102 · warning

comark/annotate/undefined-binding

Bind props to data that exists

A prop written with a : reads its value from the frontmatter or the document's meta. When nothing is at that path, the prop is empty: a box sits at 0, or a screenshot loses its image. Bindings to data or props are left alone, since the renderer fills those in.

Incorrect

---
duck:
  x: 20
  y: 30
---

::screenshot{src="/pond.png" alt="The pond map with three ducks"}
:::annotation{:x="frontmatter.duck.x" :y="frontmatter.duck.why" w=15 h=10}
The duck without a name tag.
:::
::
md
lint-comark example.mdexample.md:7:19 comark/annotate/undefined-bindingscreenshot "/pond.png", annotation 1: :y points at frontmatter.duck.why, which is undefined.Fix the path or set y directly.✖ 1 problem

Correct

---
duck:
  x: 20
  y: 30
---

::screenshot{src="/pond.png" alt="The pond map with three ducks"}
:::annotation{:x="frontmatter.duck.x" :y="frontmatter.duck.y" w=15 h=10}
The duck without a name tag.
:::
::
md
lint-comark example.md✔ No problems