Documentation
¶
Overview ¶
gmi2html provides tools to convert gemini's hypertext format (aka "gemtext") into HTML.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertString ¶
ConvertString converts a gemtext string to an HTML string using the default configuration
Types ¶
type GeminiReader ¶ added in v0.1.2
type GeminiReader struct {
// NestedBlocks is a non-standard extension which allows blockquotes to
// nest gemtext.
// Specifically, this causes the formal grammer to change to:
// quote-line = ">" gemtext-line
// default false.
NestedBlocks bool
// AllowedSchemes is a list of allowed URL schemes to turn into links.
// Default is http, https, gemini and mailto.
AllowedSchemes []string
// Apply this filter to all the outputted text after processing lines. By
// default, html.EscapeString. Does not apply to HTML attributes or text in
// preformatted blocks.
FilterText func(string) string
// InlineImages causes image links (detected by file extension) to render
// as inline img tags instead of regular links. Default false.
InlineImages bool
// contains filtered or unexported fields
}
func NewReader ¶ added in v0.1.2
func NewReader(r io.Reader) *GeminiReader
NewReader constructs a new Gemtext reader.
func (*GeminiReader) HTMLString ¶ added in v0.1.3
func (gmi *GeminiReader) HTMLString() string
/ HTMLString reads the gemini document and returns an HTML string
Click to show internal directories.
Click to hide internal directories.