Skip to content

Comment on Hyperlinks in terminal emulators

Comments

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]}'
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.