code: function(walk) {
      if (!walk.at("&")) return false;
      // Assuming entity reference
      var end = walk.lookahead(function(w) {
        // Skipping &
        walk.skip();
        var allowedChars = latinLetters;
        if (walk.matchSome(["#x", "#X"])) {
          allowedChars = hexChars;
          walk.skip(2);
        } else if (walk.at("#")) {
          allowedChars = decimalChars;
          walk.skip();
        }
        // We are standing at the first char of entity reference code
        if (w.current() == ";")  // zero-length references disallowed
          return null;
        while (w.hasCurrent()) {
          var c = w.current();
          if (c == ";") {
            w.skip();
            return w.position;
          } else if (w.matchSome(allowedChars)) {
            w.skip();
          } else return null;
        }
        return null;
      });
      // Entity reference is emitted as is
      if (end !== null) {
        this.out.push(walk.yieldUntil(end));
      } else {
        // Escaping as &amp;
        this.out.push("&amp;");
        walk.skip();
      }
      return true;
    }
docs: /* Ampersands should distinguish entity references.