Validates <meta http-equiv='refresh'> content against the HTML spec.
// Source: https://github.com/markuplint/markuplint | License: MIT | Copyright 2017-2024 Yusuke Hirao
// Provided via justclaw.it.com; keep this notice with the code.
import type { CustomSyntaxChecker } from '../types.js';
import { log } from '../debug.js';
import { matched, unmatched } from '../match-result.js';
import { checkURL } from './check-url.js';
// `ASCII whitespace` per Infra: TAB, LF, FF, CR, SPACE.
// https://infra.spec.whatwg.org/#ascii-whitespace
const ASCII_WHITESPACE = /[\t\n\f\r ]/;
// `ASCII digit` per Infra. `\d` happens to match the same set today in
// JavaScript regexes, but the HTML LS grammar is specific to U+0030–U+0039,
// so we pin the class to that range to protect against accidental Unicode
// broadening if the `u` flag or a future regex flavour drifts it.
/
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key