| Age | Commit message (Collapse) | Author |
|
The "generator" value will changes on each releases, so better to disable
it to minimize noise during release commit.
|
|
Some of attribute may depends on property of the Document.
|
|
Every time we execute "make test-parser", the generated HTML files will
changes the "Last updated xxx" (where xxx is the time its executed).
This changes prevent this unnecessary diff in the future.
|
|
Using struct limit the value to only string, while some attributes
can be an integer value, for example "leveloffset".
|
|
The idea is to provide consistent naming for metadata and attribute.
The AsciiDoctor documentation mostly name them as document attribute.
|
|
Previously, an empty line before Document Title cause the parser
stop parsing the document header, now an empty lines are skipped.
Also document attribute can be place anywhere, either before or
after title, and in between attributes; now it can be only placed
after revision or author or title.
|
|
|
|
|
|
The golangci-lint does not output any results anymore
Either we are getting good at writing Go or the linter itself is become
less good.
We also have seen that the latest golangci-lint is failed to build
with Go tip, a simple "make" on the golangci-lint never success in my
experiences.
This changes fix all the output reported by the revive and shadow.
|
|
|
|
If the attribute value end with backslash '\', the value continue to the
next line.
|
|
The meta tags from original asciidoctor are ordered as viewport,
generator, description, keywords, and then author.
While at it remove empty style tag due to when testing we use empty.css
not "stylesheet!".
|
|
Use raw string literal whenever possible.
|
|
The HTML output file from asciidoctor is renamed to test.exp.html,
and HTML output file from this library is renamed to test.got.html.
The test.html in testdata is generated from ciigo, when running
"make serve-doc".
|
|
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.
|
|
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.
|
|
Signed-off-by: Shulhan <ms@kilabit.info>
|
|
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.
|