weblink

package
v1.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2026 License: MIT Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package weblink finds web addresses in a block's output, for blocks with the links attribute, so the viewers can make them clickable.

Only http:, https: and mailto: addresses count, so following one opens the browser or the mail app and never runs or opens a local file.

Index

Constants

View Source
const Attr = "links"

Attr is the block attribute that turns links on in its output.

Variables

This section is empty.

Functions

func Find

func Find(s string) [][2]int

Find returns the start and end of each web address in s.

func OSC8

func OSC8(s string) string

OSC8 wraps each web address in s in an OSC 8 hyperlink, which a terminal that knows them makes clickable and others ignore. Text that already has OSC sequences, which may be links of its own, is left as it is.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL