stylemap

package
v0.1.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package stylemap loads and resolves the mapping from Markdown element types to Word style names. If no external file is provided, built-in defaults are used.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StyleMap

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

StyleMap holds the mapping from element keys to Word style names.

func Load

func Load(path string) (*StyleMap, error)

Load returns a StyleMap. If path is empty, built-in defaults are used. If path is provided, the file is parsed as JSON and merged over the defaults so that any key not present in the file still falls back to its default value.

func (*StyleMap) Style

func (s *StyleMap) Style(key string) string

Style returns the Word style name for the given element key. If the key is not found, "Normal" is returned as a safe fallback.

Jump to

Keyboard shortcuts

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