aboutsummaryrefslogtreecommitdiff
path: root/parser_inline_test.go
AgeCommit message (Collapse)Author
2020-12-20all: use consistent names for parserShulhan
Instead of parserX (or parser_x.go) we move the X as prefix so it will become XParser (or x_parser.go).
2020-11-14all: fix linter warningsShulhan
Remove unused constants and functions, replace Write() with fmt.Fprint(), and other fixes.
2020-11-14all: minimize error checking by using bytes.BufferShulhan
The bytes.Buffer documentation said the error returned from Write, WriteByte, WriteRune, and WriteString is always nil. So, we did not need to check the returned error. The only possible error is panic when writing with WriteString which will throw ErrTooLarge.
2020-11-12all: rewrite HTML backend template without text/templateShulhan
Instead of using text/template, we use constants of strings. This is give us more simple template and allow us to minimize duplicate code.
2020-11-08parser_inline: check for space before parsing link or macroShulhan
This is to fix the "http: <text>" to be considered a link.
2020-11-08test: add test for inline formatting with no contentShulhan
Use case: "A `/**/` *B*", should generate the following HTML A <code>/<strong></strong>/</code> <strong>B</strong>
2020-11-04all: check for duplicate IDsShulhan
If the next ID is duplicate, the asciidoc parser will generate new one by adding suffix "_x" (where x is the counter) to the duplicate ID.
2020-11-04parser_inline: truncate inline link only if its end with '.', ',' or ';'Shulhan
2020-11-04all: support inline image with link optionShulhan
2020-11-03all: implement parser for attribute referenceShulhan
The parser will replace attribute reference with its value if its exist, otherwise it will keep it as is.
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-11-01all: implement parser for inline and natural cross referenceShulhan
2020-10-31all: implement parser for block anchor and inline anchorShulhan
2020-10-29all: implement parser for inline imageShulhan
2020-10-29all: implement parser for inline URL and linkShulhan
2020-10-28all: implement parse for triple passthroughShulhan
2020-10-28all: handle escaped character when parsing inline formattingShulhan
If the inline formatting syntax begin with "\", it will be ignored and will be considered as single character.
2020-10-27all: implement parser for subscript and superscriptShulhan
Subscript is inline formatting that wrap string without space with "~". Superscript is inline formatting that wrap string without space with "^".
2020-10-27all: implement parser for single quote curveShulhan
Single quote curve is the one that start with ('`) and end with (`'). If (`') does not have a start format it will turn into apostrophe.
2020-10-26all: implement parser for double quote curve ("`...`")Shulhan
2020-10-26all: implement parser for inline formatting bold, italic, and monoShulhan
Finally, I can get this works with all the quirks of how it should be rendered. Its not perfect, at least it started working. It take me couple of weeks to figuring it out how it should be worked.