aboutsummaryrefslogtreecommitdiff
path: root/parser_test.go
AgeCommit message (Collapse)Author
2024-08-13all: refactoring DocumentAttribute into structShulhan
Using struct limit the value to only string, while some attributes can be an integer value, for example "leveloffset".
2024-08-13all: rename meta or metadata words to document attributeShulhan
The idea is to provide consistent naming for metadata and attribute. The AsciiDoctor documentation mostly name them as document attribute.
2024-08-13all: rename struct "AttributeEntry" to "DocumentAttribute"Shulhan
This is to make the struct is clear that it represent the document attribute.
2024-03-05all: replace module "share" with "pakakeh.go"Shulhan
2022-11-27all: implement inline macro for passthrough ("pass:")Shulhan
The inline passthrough "pass:" can be used to control the substitutions applied to a run of text. Ref: https://docs.asciidoctor.org/asciidoc/latest/pass/pass-macro/
2022-08-05all: cleaning up codesShulhan
Use raw string literal whenever possible.
2022-07-16all: refactoring handling generate ref IDShulhan
Previously, we always set the ID prefix and separator default to "_" if its not set, this cause all of the ID is prefixed with "_". This changes use strict rules when generating ID following the Mozilla specification [1] and latest AsciiDoc Language [2]. The idprefix must be ASCII string. It must start with "_", "-", or ASCII letters, otherwise the "_" will be added to the beginning. If one of the character is not valid, it will replaced with "_". The `idseparator` can be empty or single ASCII character ('_' or '-', ASCII letter, or digit). It is used to replace invalid characters in the REF_ID. [1] https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id [2] https://docs.asciidoctor.org/asciidoc/latest/sections/id-prefix-and-separator/
2022-07-16all: reformat all Go filesShulhan
Replace any usage of ":=" with "var" declaration with type. The ideas is to make the code reader know what is the expected return value of function/method.
2022-02-21all: relicense the asciidoctor-go under GPL 3.0 or laterShulhan
Signed-off-by: Shulhan <ms@kilabit.info>
2021-04-06go.mod: set minimum Go version to 1.16 and update module share to v0.25.1Shulhan
The latest update on share v0.25.1 remove the last boolean parameter on lib/test.Assert().
2020-12-10all: refactoring document parser to split content by linesShulhan
Previously, we read the raw content line by line. Unfortunately, this technique did not work for "include" directive, where the included file's content will be embedded to current content. This changes split the initial raw content by lines to make it allow injecting another lines when including directives exist.
2020-12-03all: unified the document node attributesShulhan
2020-11-03all: implement parser for customizing the cross reference textShulhan
The cross reference text can be customized using attribute name "reftext" with value is the alternative text to be displayed on anchor.
2020-10-31all: implement parser for block anchor and inline anchorShulhan
2020-10-29all: implement parser for inline URL and linkShulhan
2020-10-15asciidoctor-go: asciidoctor markup parser for GoShulhan
This is the first commit that can parser whole document line by line and provide convertion to HTML. Things that does not working: inline style, table, passthrough, dynamic attributes, include.