лооо
This commit is contained in:
@@ -9,11 +9,7 @@ PLAIN_LINK_RE = re.compile(r"(?P<label>[^\n<>()]+?) \((?P<url>https?://[^\s)]+)\
|
||||
|
||||
|
||||
def build_hidden_link(config: dict) -> str:
|
||||
url = config.get("hidden_link_url", "").strip()
|
||||
if not url:
|
||||
return ""
|
||||
invisible = config.get("hidden_link_char", "​")
|
||||
return f'<a href="{escape(url, quote=True)}">{invisible}</a>'
|
||||
return ""
|
||||
|
||||
|
||||
def convert_plain_links_to_html(template: str) -> str:
|
||||
@@ -110,11 +106,8 @@ def build_channel_text(config: dict, state: dict) -> str:
|
||||
template = convert_plain_links_to_html(template)
|
||||
template, used_keys = replace_actor_placeholders(template, config, state)
|
||||
actors_block = build_actor_lines(config, state, skip_keys=used_keys)
|
||||
hidden_link = build_hidden_link(config)
|
||||
|
||||
text = template.replace("{{actors}}", actors_block)
|
||||
text = text.replace("{{hidden_link}}", "")
|
||||
if hidden_link:
|
||||
text = f"{hidden_link}{text}"
|
||||
|
||||
return text
|
||||
|
||||
Reference in New Issue
Block a user