Forgot to un-none value
This commit is contained in:
parent
7983afde45
commit
01d405772f
1 changed files with 2 additions and 2 deletions
|
@ -195,7 +195,7 @@ class EndFunctionStyle(BaseStyleCommand, names=[]):
|
|||
|
||||
@dataclass(config=DEFAULT_CONFIG)
|
||||
class BaseStyleFunction(Style):
|
||||
value: str | None
|
||||
value: str
|
||||
|
||||
def __init_subclass__(cls, names: list[str]) -> None:
|
||||
for name in names:
|
||||
|
@ -282,7 +282,7 @@ class ColorStyle(BaseStyleFunction, names=[]):
|
|||
class LinkStyle(BaseStyleFunction, names=["l"]):
|
||||
def tag(self, out: Stream):
|
||||
href = self.value
|
||||
if href is not None and not href.startswith(("http:", "https:")):
|
||||
if not href.startswith(("http:", "https:")):
|
||||
href = "#" + href.replace("#", "@")
|
||||
return out.pair_tag("a", href=href)
|
||||
|
||||
|
|
Loading…
Reference in a new issue