render

package
v0.0.0-...-1effcde Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HNToPlainText

func HNToPlainText(raw string) string

HNToPlainText converts HN's limited HTML to plain text without wrapping. Useful for pre-filling edit forms with decoded comment text.

func HNToText

func HNToText(raw string, width int) string

HNToText converts HN's limited HTML to plain text with word wrapping. HN uses: <p> (paragraph), <a> (links), <i> (italic), <code> (inline code), <pre><code> (code blocks), and HTML entities.

func TimeAgo

func TimeAgo(unix int64) string

TimeAgo returns a human-readable relative time string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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