Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DirectionRead = "read" DirectionWrite = "write" DirectionBoth = "both" )
Functions ¶
This section is empty.
Types ¶
type CodeBlockTransform ¶
type CodeBlockTransform struct {
FromLang string `yaml:"from_lang"`
ToLang string `yaml:"to_lang"`
Direction string `yaml:"direction"` // "read": replace ToLang->FromLang when reading, "write": replace FromLang->ToLang when writing, "both": apply both transformations
Enabled *bool `yaml:"enabled"`
}
func (*CodeBlockTransform) CheckDirection ¶
func (c *CodeBlockTransform) CheckDirection(direction string) bool
func (*CodeBlockTransform) GetLang ¶
func (c *CodeBlockTransform) GetLang(direction string) (string, string)
func (*CodeBlockTransform) IsEnabled ¶
func (c *CodeBlockTransform) IsEnabled() bool
IsEnabled returns true if the transform is enabled, false otherwise, defaulting to true if nil
type MDCodeBlockHandler ¶
type MDCodeBlockHandler struct {
}
type MDConfig ¶
type MDConfig struct {
CodeBlockTransforms []CodeBlockTransform `yaml:"code_block_transforms"`
}
type MDHandler ¶
type MDHandler struct {
// contains filtered or unexported fields
}
func NewMDHandler ¶
func NewMDHandler() *MDHandler
type MDNormalizeHandler ¶ added in v1.0.72
type MDNormalizeHandler struct {
}
Click to show internal directories.
Click to hide internal directories.