Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library

Comment by kristopolous

1 day ago

tl;dr

here's coming from markdown

        LINK      = ["\033]8;;", "\033]8;;\033\\"]
        re.sub(r"\[([^\]]+)\]\(([^\)]+)\)", process_links, line)
        def process_links(match):
          description = match.group(1)
          url = match.group(2)
          return f'{LINK[0]}{url}\033\\{UNDERLINE[0]}{description}{UNDERLINE[1]}{LINK[1]}'

0 comments

kristopolous

Reply

No comments yet

Contribute on Hacker News ↗

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities