package
3.0.2
Repository: https://github.com/thecsw/darkness.git
Documentation: pkg.go.dev

# README

yunyun

Ahh, Yunyun from the fantastic KonoSuba.

yunyun is the lowest-level package, which should not import anything else from darkness, as it contains all base- and internal-level structs plus definitions.

Why yunyun? In the story, she is the supporter of her village. True heir, who always helps her friends, and never really truly appreciated for all her efforts. It seems fitting for a package that is truly helping every other, but not including any other package.

# Packages

No description provided by the author

# Functions

AddFlag marks the flag in the first argument.
AnyPathsToStrings converts an array of `AnyPath` to `string`.
AsymmetricEmphasis returns regexp with asymmetric borders.
ExtractLink uses `linkRegexp` and returns first extracted link.
ExtractLinks uses `linkRegexp` and returns an array of extracted links, if any.
FancyText replaces boring single and double quotes with fancier Unicode versions.
FlipFlag flips the flag in the first argument.
HasFlag returns true if the flag is found, false otherwise.
JoinPaths joins relative paths.
JoinRelativePaths joins relative paths.
LatchFlags returns four functions: add, remove, flip, and has for the flag container.
NewPage creates a new `Page` and runs passed options.
RelativePathTrim returns the directory of the relative file.
RemoveFlag removes the flag in the first argument.
RemoveFormatting will remove all special markup symbols.
SymmetricEmphasis is a useful tool to create simple text markups.
WithContents sets the contents.
WithFilename sets the filename.
WithLocation sets the Url.

# Constants

AccoutrementDefault means that the value is default.
AccoutrementDisabled means user forced disable.
AccoutrementEnabled means user forced enable.
InCenterFlag is used internally to mark center states.
InDetailsFlag is used internally to mark details states.
InDropCapFlag is used internally to make drop cap states.
InGalleryFlag is used internally to mark gallery states.
InListFlag is used internally to mark list states.
InQuoteFlag is used internally to mark quote states.
InRawHtmlFlag is used internally to mark raw html states.
InRawHtmlFlagResponsive is used internally to mark responsive html states.
InRawHtmlFlagUnsafe is used internally to mark unsafe html states.
InSourceCodeFlag is used internally to mark source code states.
InTableFlag is used internally to mark table states.
InTableHasHeadersFlag is used internally to mark table delimiter states.
TypeAttentionText is the type of attention text block.
TypeDetails is the type for html details.
TypeHeading is the type of heading.
TypeHorizontalLine is the type of horizontal line.
TypeLink is the type of link.
TypeList is the type of unordered list.
TypeListNumbered is the type of numbered list.
TypeParagraph is the type of paragraph, which is just text.
TypeRawHtml is the type of raw HTML block.
TypeShouldBeLastDoNotTouch the last type that should not be touched -- It's used to verify consistency within darkness.
TypeSourceCode is the type of source code block.
TypeTable is the type of a table.
YunYunStartCustomFlags is used internally to mark last flag.

# Variables

ActiveMarkings can be set by parser to define custom markings.
AudioFileExtRegexp is the regexp for matching audio (mp3, flac, midi).
matches "*/bold italic/*".
BoldText is the regexp for matching bold text.
FootnotePostProcessingRegexp is the regexp for matching footnotes references.
FootnoteRegexp is the regexp for matching footnotes.
ImageExtRegexp is the regexp for matching images (png, gif, jpg, jpeg, svg, webp).
matches "/*italic bold*/".
ItalicText is the regexp for matching italic text.
KeyboardRegexp is the regexp for matching keyboard text.
LinkRegexp is the regexp for matching links.
MathRegexp is the regexp for matching math text.
NewLineRegexp matches a new line for non-math environments.
SpecialTextMarkups simply combines some common formatting options above.
StrikethroughText is the regexp for matching strikethrough text.
SubscriptText is the regexp for matching subscript text.
SuperscriptText is the regex for matching superscript text.
UnderlineText is the regexp for matching underline text.
UrlRegexp is yoinked from https://ihateregex.io/expr/url/.
VerbatimText is the regexp for matching verbatim text.
VideoFileExtRegexp matches commonly used video file formats.

# Structs

Accoutrement are settings of a page.
Content is a piece of content of a page.
ExtractedLink represents the link that was extracted with `ExtractLink` or `ExtractLinks`.
Link is a struct for holding the link tag.
ListItem is an item from our internal list representation.
Markings is used to store the regex patterns for our formatting, like bold, italics, etc.
MetaTag is a struct for holding the meta tag.
Page is a struct for holding the page contents.

# Interfaces

AnyPath is a full generalization of relative and full paths.
FullPath is a type constraint for `FullPath`-style types.
RelativePath is a type constraint for `RelativePath`-style paths.

# Type aliases

AccoutrementFlip holds the state of the flag: default, set, unset.
Bits is aliased to `uint16` to store flags.
Contents is a type of contents.
ExcludeHtmlHeadContains is a type to store excluded keywords for html head.
FullPathDir is the result of joining emilia root with `RelativePath`.
FullPathFile is the result of joining emilia root with `RelativePathFile`.
PageOption representions a function that can be passed to a new `Page` instantiation to modify the state.
RelativePathDir is used in `Page` for `Location` to make sure that we are passing correct understanding of that it should only have the relative path to the workspace -- this should be a directory with NO filename and NO base.
RelativePathFile is similar to `RelativePath` but also includes the filename in the end as base.
TypeContent is the type of content, used for enums.