ruby

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//ひらがなとカタカナの文字コードの差
	KANADIFF          = 96
	RUBY_PATTERN_HTML = "<ruby>{{.Parent}}<rp>(</rp><rt>{{.Ruby}}</rt><rp>)</rp></ruby>"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Pattern *template.Template
}

Configuration

func NewConfiguration

func NewConfiguration(pattern string) (*Configuration, error)

Configuration Constructor

type Ruby

type Ruby struct {
	Parent string
	Ruby   string
}

ルビ TODO命名がくそ

type RubyWriter

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

RubyWriter

func NewRubyWriter

func NewRubyWriter(config *Configuration) (*RubyWriter, error)

RubyWriter Constructor

func (*RubyWriter) AddRuby

func (rw *RubyWriter) AddRuby(str string) (string, error)

引数の文字列にルビを追加する

func (*RubyWriter) MakeRuby

func (rw *RubyWriter) MakeRuby(string) (string, error)

TODO引数の文字列のルビを除去してルビを降りなおす

func (*RubyWriter) RemoveRuby

func (rw *RubyWriter) RemoveRuby(string) (string, error)

TODO引数の文字列からルビを除去する

Jump to

Keyboard shortcuts

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