class

Hwaro::Services::ContentValidator

Inherits Reference < Object

Constants

HTML_ATTRIBUTE_RE = /([^\s"'>\/=]+)(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?/

One HTML attribute: its name, then an optional =value (quoted or not). Consuming each value whole is what keeps title="x alt=y" from reading as an alt attribute.

HTML_IMG_RE = /<img(\s#{Utils::TextUtils::HTML_TAG_ATTRS_QUOTED_VALUES})?\/?>/i

Quote-aware: title="a > b" does not end the tag before its alt.

TOML_FRONTMATTER_RE = Utils::FrontmatterScanner::TOML_FRONTMATTER_RE
YAML_FRONTMATTER_RE = Utils::FrontmatterScanner::YAML_FRONTMATTER_RE

Constructors

new(content_dir : String = "content")
Source

Instance methods

Nested types