| Age | Commit message (Collapse) | Author |
|
Previously, to test parser and check the generated HTML, we write AsciDoc
input and expected HTML output using literal string `...`.
The text of input and output sometimes long, take multiple lines, which
makes the test code ugly, hard to write, and read.
Using lib/test.Data we can write the input and output as the AsciiDoc
markup and the HTML markup as is, simplify writing the test and more
readable.
|
|
Since the Parse return a *Document it should grouped into document.go
to make the code consistent.
|
|
This is to prevent empty lines that contains only white spaces considered
as non-empty line.
While at it, fix typo in the comment.
|
|
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.
|
|
Minimize struct allocation,
* columnFormat: from 40 to 16 bytes (-24 bytes)
* document: from 400 to 392 bytes (-8 bytes)
* element: from 312 to 264 bytes (-48 bytes)
* elementAttribute: from 80 to 72 bytes (-8 bytes)
* elementInclude: from 128 to 120 bytes (-8 bytes)
* elementTable: from 88 to 64 bytes (-24 bytes)
* inlineParser: from 64 to 40 bytes (-24 bytes)
Plus all structs in the test files.
|
|
Signed-off-by: Shulhan <ms@kilabit.info>
|
|
The latest update on share v0.25.1 remove the last boolean parameter
on lib/test.Assert().
|
|
This is for consistency on exported method names on Document object.
While at it, simplify the documentation for exported methods.
|
|
Previously, HTMl document generated from ToEmbeddedHTML contains div
with id "content" and sub div "preamble".
This changes, make the ToEmbeddedHTML generate the HTML document without
those divs wrapper.
|
|
If the list body contains continuation with open block, the whole open
block content should be treatent as sub-of block until it end with
"--".
|
|
|
|
The ToEmbeddedHTML will generate the document content only, without
header and footer.
|
|
This changes also support different title separator using meta attribute
"title-separator".
|
|
|