inlinecode

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package inlinecode renders short inline code fragments inside prose.

templ: version: v0.3.1020

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Instance

type Instance struct {
	// contains filtered or unexported fields
}

Instance is a renderable inline code fragment.

func InlineCode

func InlineCode(text string, options ...Option) Instance

InlineCode returns a semantic inline code fragment.

func (Instance) Kind

func (Instance) Kind() components.Kind

Kind identifies the component as inline code.

func (Instance) Render

func (i Instance) Render(ctx context.Context, w io.Writer) error

Render writes the inline code markup.

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option configures inline code.

func WithRootAttrs

func WithRootAttrs(attrs templ.Attributes) Option

WithRootAttrs adds arbitrary attributes to the code element.

func WithRootClass

func WithRootClass(class string) Option

WithRootClass appends CSS classes to the code element.

Jump to

Keyboard shortcuts

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