blockwatch 0.5.3

Language agnostic linter that keeps your code and documentation in sync and valid
Documentation
1
2
3
4
5
6
7
8
9
10
-- Reports the values `check-lua-pattern` extracted, so a fixture can assert them through the
-- block's `name` attribute.
function validate(ctx, content)
  local expected = ctx.attrs["name"]
  local actual = table.concat(content, ",")
  if actual ~= expected then
    return "expected '" .. expected .. "' but got '" .. actual .. "'"
  end
  return nil
end