| Age | Commit message (Collapse) | Author |
|
A line that start with one or more space will be considered
as literal paragraph.
Once literal line found it will end until an empty line.
|
|
Example of block code with include directive,
----
...
include::file[]
...
----
|
|
Some of attribute may depends on property of the Document.
|
|
Previously, given the following markup,
----
* Sub list
+
Sub list content.
//}}}
//{{{
== Sub 2
//}}
----
The section "Sub 2" will be parsed as paragraph instead of new section.
|
|
Each lines to be parsed has been trimmed on the first load, so
there is no need to do it again, on some cases.
|
|
The ":leveloffset:" on document attribute allow increment
or decrement the heading level on included files.
Reference: https://docs.asciidoctor.org/asciidoc/latest/directives/include-with-leveloffset/
|
|
Using struct limit the value to only string, while some attributes
can be an integer value, for example "leveloffset".
|
|
The elKindSection0 is the Document Title, the line that start
with "= ".
|
|
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.
|
|
|
|
|
|
Any custom ID on the first section always replaced with the subsection
because, first, when detecting preamble we did not check for line with
kind ID "[[...]]" an short ID "[#...]".
Second, when parsing preamble we did not stop when we found line kind
ID and short ID.
This preamble thing is kind of annoying.
We need to revisit again how to detect preamble, maybe not calling
separate block parser, but making it linear as the default first child of
parent element.
|
|
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.
|
|
Given the following markup,
[square]
* item 1
[circle]
** item 2
The list on item 2 now start with `<div class="ulist circle">`.
|
|
The unordered list item with hyphen ('-') cause too much confusion and
inconsistency, nevertheless most of still use it.
Case one, given the following markup,
```
- Item 1
+
"A line
of quote"
-- Author
```
Is the "Author" the sub item in list or we are parsing author of quote
paragraph?
Case two, the writer want to write em dash (`—` in HTML Unicode) but
somehow the editor wrap it and start in new line.
As a reminder, the official documentation only recommend using hyphen for
simple list item [1].
[1] https://docs.asciidoctor.org/asciidoc/latest/lists/unordered/#basic-unordered-list
|
|
If the document contains empty preamble do not output the HTML wrapper of
it.
|
|
If the attribute value end with backslash '\', the value continue to the
next line.
|
|
This is to minimize checking for space when parsing later.
|
|
This is to prevent empty preamble being rendered in HTML content.
|
|
In the parseListOrdered, each time we found list item, we store its
counter and increment it by one so backend can use it to render the
counter.
|
|
Previously, given the following include statements in the main document
include::list_desc.adoc[]
include::list_desc.adoc[]
Where list_desc.adoc content is,
Item 00::
+
--
* Bullet 0
+
Description 0.
* Bullet 1
--
The first include is parsed correctly, but the second include is parsed
as is.
|
|
Use raw string literal whenever possible.
|
|
Since the Parse return a *Document it should grouped into document.go
to make the code consistent.
|
|
The state should store the previous kind of line being parsed, not the
next state.
|
|
This is to allow testing the preamble inside the document.
|
|
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>
|
|
|
|
Using prefix adoc to module asciidoc is kinda bit stutter.
|
|
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
"--".
|
|
By using open block "--" we allow the list body content without adding
"+" for each empty line.
|
|
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.
|
|
There are basic things that need to be done before we can implement
the "include" directive, especially on how to embed the content of
included file into the content of current document.
|
|
The full path will be required later for implementing the "include"
directive.
|
|
|
|
Custom markers including "square", "circle", "disc", "none", "no-bullet",
"unstyled", and any strings that is not part of asciidoc internal styles.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Currently supported format with "cols" options are,
* setting number of columns,
* setting the horizontal and vertical alignment
* setting the column width
|
|
Using map is unpredictable for class. Imagine if we have CSS that
set style based on order of class "a.b", using map sometimes will
generate a string "b a" which will not what we expect.
|
|
|
|
The following metadata has been implemented,
* "idprefix": changing the auto generated ID prefix
* "idseparator": changing the separator for auto generated ID
* "sectids": enabling or disabling auto generated ID
* "sectlinks": generate link on section title
* "sectanchors: generate an anchor, empty link, before section title
|
|
Also support setting and checking metadata revnumber, revdate, revremark,
and version-label.
|
|
|