Definition at line 370 of file typescriptdomain.py.
◆ __init__()
def typescriptdomain.LinkingHtmlFormatter.__init__ |
( |
|
self, |
|
|
** |
kwargs |
|
) |
| |
Definition at line 371 of file typescriptdomain.py.
371 def __init__(self, **kwargs):
372 super(LinkingHtmlFormatter, self).__init__(**kwargs)
373 self._builder = kwargs[
"_builder"]
374 self._bridge = kwargs[
"_bridge"]
◆ _get_value()
def typescriptdomain.LinkingHtmlFormatter._get_value |
( |
|
self, |
|
|
|
value, |
|
|
|
tok |
|
) |
| |
|
private |
Definition at line 376 of file typescriptdomain.py.
376 def _get_value(self, value, tok):
381 return '<span style="font-weight: bolder">%s</span>' % (value,)
385 "{}:{}: code block contains xref to '{}' with unsupported trailing underscore".format(
386 self._bridge.path, self._bridge.line, xref
391 if xref.startswith(
'"'):
393 if re.match(
"^[0-9]+$", xref)
is not None:
410 if self._bridge.docname
is None:
414 content = caption
if caption
is not None else value
415 ts = self._builder.env.get_domain(
"ts")
416 r1 = ts.objects.get((
"type", xref),
None)
419 self._builder.get_relative_uri(self._bridge.docname, r1[0])
424 '<a style="color:inherit;text-decoration:underline" href="%s">%s</a>'
428 std = self._builder.env.get_domain(
"std")
429 r2 = std.labels.get(xref.lower(),
None)
432 self._builder.get_relative_uri(self._bridge.docname, r2[0])
437 '<a style="color:inherit;text-decoration:underline" href="%s">%s</a>'
440 r3 = std.anonlabels.get(xref.lower(),
None)
443 self._builder.get_relative_uri(self._bridge.docname, r3[0])
448 '<a style="color:inherit;text-decoration:underline" href="%s">%s</a>'
453 "{}:{}: code block contains unresolved xref '{}'".format(
454 self._bridge.path, self._bridge.line, xref
def tok_getprop(tok, key)
References typescriptdomain.LinkingHtmlFormatter._bridge, typescriptdomain.LinkingHtmlFormatter._builder, and typescriptdomain.tok_getprop().
Referenced by typescriptdomain.LinkingHtmlFormatter._fmt().
◆ _fmt()
def typescriptdomain.LinkingHtmlFormatter._fmt |
( |
|
self, |
|
|
|
value, |
|
|
|
tok |
|
) |
| |
|
private |
◆ _format_lines()
def typescriptdomain.LinkingHtmlFormatter._format_lines |
( |
|
self, |
|
|
|
tokensource |
|
) |
| |
|
private |
Just format the tokens, without any wrapping tags.
Yield individual lines.
Definition at line 467 of file typescriptdomain.py.
467 def _format_lines(self, tokensource):
469 Just format the tokens, without any wrapping tags.
470 Yield individual lines.
472 lsep = self.lineseparator
473 escape_table = _escape_html_table
476 for ttype, value
in tokensource:
479 parts = value.translate(escape_table).split(
"\n")
484 elif len(parts) == 1:
486 line += self._fmt(parts[0], ttype)
488 line += self._fmt(parts[0], ttype)
490 for part
in parts[1:-1]:
491 yield 1, self._fmt(part, ttype) + lsep
492 line = self._fmt(parts[-1], ttype)
uint16_t len
length of data (which is always a uint32_t, but presumably this can be used to specify that fewer byt...
def get_annotation(tok, key)
References typescriptdomain.LinkingHtmlFormatter._fmt(), typescriptdomain.get_annotation(), and len.
◆ _builder
typescriptdomain.LinkingHtmlFormatter._builder |
|
private |
◆ _bridge
typescriptdomain.LinkingHtmlFormatter._bridge |
|
private |
The documentation for this class was generated from the following file: