···77from abc import abstractmethod
88from collections.abc import Mapping, Sequence
99from pathlib import Path
1010-from typing import Any, cast, ClassVar, Generic, get_args, NamedTuple, Optional, Union
1010+from typing import Any, cast, ClassVar, Generic, get_args, NamedTuple
11111212-import markdown_it
1312from markdown_it.token import Token
14131514from . import md, options
···1716from .html import HTMLRenderer, UnresolvedXrefError
1817from .manual_structure import check_structure, FragmentType, is_include, TocEntry, TocEntryType, XrefTarget
1918from .md import Converter, Renderer
2020-from .utils import Freezeable
21192220class BaseConverter(Converter[md.TR], Generic[md.TR]):
2321 # per-converter configuration for ns:arg=value arguments to include blocks, following
···519517 # we use blender-style //path to denote paths relative to the origin file
520518 # (usually index.html). this makes everything a lot easier and clearer.
521519 if not into.startswith("//") or '/' in into[2:]:
522522- raise RuntimeError(f"html:into-file must be a relative-to-origin //filename", into)
520520+ raise RuntimeError("html:into-file must be a relative-to-origin //filename", into)
523521 into = token.meta['include-args']['into-file'] = into[2:]
524522 if into in self._redirection_targets:
525523 raise RuntimeError(f"redirection target {into} in line {token.map[0] + 1} is already in use")
···617615 for item in xref_queue:
618616 try:
619617 target = item if isinstance(item, XrefTarget) else self._render_xref(*item)
620620- except UnresolvedXrefError as e:
618618+ except UnresolvedXrefError:
621619 if failed:
622620 raise
623621 deferred.append(item)