text-fragments-ts/src/ whatwg-infra.ts
22 lines
1016 B

  1. ////////////////////////////////////////////////
  2. /// Required pieces of the WHATWG Infra Spec ///
  3. ////////////////////////////////////////////////
  4. // Based on the version of 6 August 2020 <https://infra.spec.whatwg.org/commit-snapshots/38caa3d54ec94b757326b18b0b6cfb39c454f1de/>
  5. // https://infra.spec.whatwg.org/#ascii-whitespace
  6. // “ASCII whitespace is U+0009 TAB, U+000A LF, U+000C FF, U+000D CR, or U+0020 SPACE.”
  7. export const asciiWhitespace = '\u0009\u000a\u000c\u000d\u0020';
  8. // https://infra.spec.whatwg.org/#ascii-string
  9. // “An ASCII string is a string whose code points are all ASCII code points.”
  10. export type AsciiString = string;
  11. // https://infra.spec.whatwg.org/#html-namespace
  12. // “The HTML namespace is "http://www.w3.org/1999/xhtml".”
  13. export const htmlNamespace = 'http://www.w3.org/1999/xhtml';
  14. // https://infra.spec.whatwg.org/#xml-namespace
  15. // “The XML namespace is "http://www.w3.org/XML/1998/namespace".”
  16. export const xmlNamespace = 'http://www.w3.org/XML/1998/namespace';