Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit3bb1da2647

README.md

untrusted_text

The marking every read applies to text another account wrote: a comment, a pull request's title and description, an issue, a review, a rating note, and world chat. Each item another account wrote carries untrusted = true, each item the reading account wrote carries untrusted = false, and the read carries warning, the sentence that says what the marking means. A text surface (the engine bash, a notice) quotes such text through quote, which carries the marking in the text itself.

Exports

  • WARNING — the sentence a read of other accounts' text carries as warning.
  • TAG — the word a text surface puts before a quoted untrusted text.
  • isOwn(author, account?) — whether an item's author is the reading account.
  • markItem(item, account?, authorField?) — mark one item by who wrote it; an item whose author is unknown, or read with no account known, is marked untrusted.
  • markList(items, account?, authorField?) — mark each item of a list.
  • read(field, items, account?, authorField?) — the answer of a read that returns a list of items others wrote: { warning = WARNING, [field] = items }, each item marked.
  • markRecord(record, account?, field?, authorField?) — mark a read's record in place and set record.warning.
  • literal(text) — the text as one JSON string, so it stays a single quoted token on a text surface.
  • quote(text) — the text quoted for a text surface: the tag, then the text as a JSON string.
  • localAccount() — the account this engine reads as, or nil when it holds no credential.