Definition at line 61 of file typescriptdomain.py.
61 def run(self) -> List[Node]:
62 document = self.state.document
63 code =
"\n".join(self.content)
64 location = self.state_machine.get_source_and_line(self.lineno)
66 linespec = self.options.
get(
"emphasize-lines")
69 nlines =
len(self.content)
70 hl_lines = parselinenos(linespec, nlines)
71 if any(i >= nlines
for i
in hl_lines):
73 __(
"line number spec is out of range(1-%d): %r")
74 % (nlines, self.options[
"emphasize-lines"]),
78 hl_lines = [x + 1
for x
in hl_lines
if x < nlines]
79 except ValueError
as err:
80 return [document.reporter.warning(err, line=self.lineno)]
84 if "dedent" in self.options:
85 location = self.state_machine.get_source_and_line(self.lineno)
86 lines = code.split(
"\n")
87 lines = dedent_lines(lines, self.options[
"dedent"], location=location)
88 code =
"\n".join(lines)
90 literal = nodes.literal_block(code, code)
91 if "linenos" in self.options
or "lineno-start" in self.options:
92 literal[
"linenos"] =
True
93 literal[
"classes"] += self.options.
get(
"class", [])
94 literal[
"force"] =
"force" in self.options
95 literal[
"language"] =
"tsref"
96 extra_args = literal[
"highlight_args"] = {}
97 if hl_lines
is not None:
98 extra_args[
"hl_lines"] = hl_lines
99 if "lineno-start" in self.options:
100 extra_args[
"linenostart"] = self.options[
"lineno-start"]
101 self.set_source_info(literal)
103 caption = self.options.
get(
"caption")
106 literal = container_wrapper(self, literal, caption)
107 except ValueError
as exc:
108 return [document.reporter.warning(exc, line=self.lineno)]
110 tsid =
"tsref-type-" + self.arguments[0]
111 literal[
"ids"].append(tsid)
113 tsname = self.arguments[0]
114 ts = self.env.get_domain(
"ts")
115 ts.add_object(
"type", tsname, self.env.docname, tsid)
static void run(void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *c)
Main function that will be run.
static int get
Get DID Documement for DID Flag.
uint16_t len
length of data (which is always a uint32_t, but presumably this can be used to specify that fewer byt...
References Set.content, GNUNET_ABD_Request.env, SolverHandle.env, GAS_PROPORTIONAL_Handle.env, CadetOutOfOrderMessage.env, CadetConnection.env, GCP_MessageQueueManager.env, CadetTunnelQueueEntry.env, Channel.env, PeerRecord.env, GNUNET_DATACACHE_Handle.env, Plugin.env, GNUNET_DATASTORE_QueueEntry.env, DatastorePlugin.env, GNUNET_DHT_PutHandle.env, GDS_Underlay.env, GSF_PeerTransmitHandle.env, GSF_DelayedHandle.env, PeerPlan.env, MigrationReadyPeer.env, GNUNET_GNS_LookupRequest.env, GNUNET_NAMESTORE_QueueEntry.env, GNUNET_NAMESTORE_ZoneIterator.env, TransportPlugin.env, RequestContext.env, GNUNET_RECLAIM_Operation.env, GNUNET_RECLAIM_TicketIterator.env, GNUNET_RECLAIM_AttributeIterator.env, GNUNET_RECLAIM_CredentialIterator.env, HTTP_Client_Plugin.env, HTTP_Server_Plugin.env, Neighbour.env, get, len, GNUNET_CADET_ConnectionCreateMessage.options, InitMessage.options, GSC_Client.options, GNUNET_DHT_ClientGetMessage.options, GNUNET_DHT_ClientResultMessage.options, GNUNET_DHT_ClientPutMessage.options, GNUNET_DHT_MonitorPutMessage.options, GNUNET_DHT_MonitorGetMessage.options, GNUNET_DHT_MonitorGetRespMessage.options, GNUNET_DHT_GetHandle.options, GetActionContext.options, PeerPutMessage.options, PeerResultMessage.options, PeerGetMessage.options, RecentRequest.options, SearchMessage.options, GNUNET_FS_PublishContext.options, GNUNET_FS_SearchContext.options, GNUNET_FS_DownloadContext.options, GNUNET_FS_PublishKskContext.options, GSF_PendingRequestData.options, LookupMessage.options, GNUNET_GNS_LookupWithTldRequest.options, GNS_ResolverHandle.options, StoreRecordMessage.options, GNUNET_PEERSTORE_StoreContext.options, HTTP_Client_Plugin.options, PrettyPrinterContext.options, HttpAddress.options, ServerRequest.options, HTTP_Server_Plugin.options, IPv4TcpAddress.options, IPv6TcpAddress.options, TemplateAddress.options, IPv4UdpAddress.options, IPv6UdpAddress.options, UnixAddress.options, WlanAddress.options, Plugin.options, LEGACY_SERVICE_Context.options, StartMessage.options, GNUNET_SERVICE_Handle.options, CadetChannel.state, CadetConnection.state, GNUNET_CONVERSATION_Caller.state, GNUNET_CONVERSATION_Phone.state, GNUNET_CONVERSATION_Call.state, MonitorNotifyMessage.state, GNUNET_FS_UnindexContext.state, DownloadRequest.state, Socks5Request.state, GNUNET_TRANSPORT_SessionInfo.state, GNUNET_MESSENGER_SrvRoom.state, GNUNET_MESSENGER_SrvTunnel.state, OIDC_Variables.state, MhdConnectionHandle.state, Operation.state, Set.state, RegisteredHostContext.state, LCFContext.state, OperationContext.state, GNUNET_TESTBED_Operation.state, GNUNET_TESTBED_Peer.state, ServiceConnectData.state, GNUNET_TESTBED_RunHandle.state, NeighbourMapEntry.state, ValidationEntry.state, MonitoredPeer.state, PeerResolutionContext.state, RequestHandle.state, ValidationIterateResponseMessage.state, and PeerIterateResponseMessage.state.
Referenced by gnunet_testing.Check.run_blocking(), and gnunet_testing.Check.run_once().