diff options
| author | Shulhan <ms@kilabit.info> | 2022-07-24 21:41:14 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2022-07-24 21:41:14 +0700 |
| commit | 58bd7778b3851a5d39b460140a410d963152882e (patch) | |
| tree | ab07fc9b2e062f9af8b42cf70fe219ef4c946e43 | |
| parent | 36e28fcc4292788569b75f7da6cbfdc95a956408 (diff) | |
| download | asciidoctor-go-0.3.0.tar.xz | |
Release asciidoctor-go v0.3.0 (2022-07-24)v0.3.0
This release set the minimum Go version to 1.18.
=== Breaking changes
* all: refactoring handling generate ref ID
=== Enhancements
* all: sort the generated HTML meta by names
* all: store the list of author names under Attributes "author_names"
* all: add default metadata "generator"
* all: realign all structs
=== Chores
* all: rewrite test using lib/test.Data
| -rw-r--r-- | CHANGELOG.adoc | 137 | ||||
| -rw-r--r-- | asciidoctor.go | 2 |
2 files changed, 116 insertions, 23 deletions
diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 08a2088..4259a79 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -7,14 +7,96 @@ Shulhan <ms@kilabit.info> :sectanchors: :sectlinks: +[#v0_3_0] +== asciidoctor-go v0.3.0 (2022-07-24) + +This release set the minimum Go version to 1.18. + +[#v0_3_0_breaking_changes] +=== Breaking changes + +all: refactoring handling generate ref ID:: ++ +-- +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/ +-- + +[#v0_3_0_enhancements] +=== Enhancements + +all: sort the generated HTML meta by names:: ++ +-- +The order of meta names are "author", "description", "generator", and +then "keywords". +-- + +all: store the list of author names under Attributes "author_names":: ++ +-- +Previously, to get list of author names, we need to iterate each of +the Authors field. + +This changes set the Attributes "author_names" to list of author full +names, each separated by comma. +-- + +all: add default metadata "generator":: ++ +-- +The generator metadata contains the library name and its current version. +-- + +all: realign all structs:: ++ +-- +This is to minimize memory allocation when using asciidoctor. +-- + +[#v0_3_0_chores] +=== Chores + +all: rewrite test using lib/test.Data:: ++ +-- +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. +-- + + +[#v0_2_0] == asciidoctor-go v0.2.0 (2022-03-04) This release changes the license of asciidoctor-go from BSD to GPL 3.0 or later. -=== Bug fixes +[#v0_2_0_bug_fixes] +=== Bug fixes -* all: fix list check box text get cut one character +all: fix list check box text get cut one character:: + -- Given the following asciidoc check box markup, @@ -24,43 +106,54 @@ Given the following asciidoc check box markup, It will rendereded as "❏ bc" instead of "❏ abc". -- -=== Chores +[#v0_2_0_chores] +=== Chores -* all: replace bytes.Title and strings.Title with function +all: replace bytes.Title and strings.Title with function:: + +-- Both of those functions has been deprecated. -+ + Since the Title function is to convert the adminition string into a human title (first letter uppercase), we can use a function to do that. Any unknown admonition will be returned as is. +-- -== asciidoctor-go v0.1.1 (2021-12-06) - -=== Bug fixes +[#v0_1_1] +== asciidoctor-go v0.1.1 (2021-12-06) -* all: fix parsing and rendering cross reference - Previously, when parsing cross reference we assume that if the string - contains upper-case letter then it's a label so we store it as title - to search for ID later. +[#v0_1_1_bug_fixes] +=== Bug fixes - The bug is when ID is set manually and its contains upper-case for - example "[#Id]". +all: fix parsing and rendering cross reference:: ++ +-- +Previously, when parsing cross reference we assume that if the string +contains upper-case letter then it's a label so we store it as title +to search for ID later. - This changes fix this issue by storing cross reference first, not - assuming it as ID or title, and then when doing rendering we check - whether its ID or title. +The bug is when ID is set manually and its contains upper-case for +example "[#Id]". -* all: allow colon ':' and period '.' on the ID +This changes fix this issue by storing cross reference first, not +assuming it as ID or title, and then when doing rendering we check +whether its ID or title. +-- - According to XML spec [1], the colon is allowed as the first and the next - character. While period is only allowed on the next characters. +all: allow colon ':' and period '.' on the ID:: ++ +-- +According to XML spec [1], the colon is allowed as the first and the next +character. While period is only allowed on the next characters. - [1] https://www.w3.org/TR/REC-xml/#NT-Name +[1] https://www.w3.org/TR/REC-xml/#NT-Name +-- -== asciidoctor-go v0.1.0 (2021-03-06) +[#v0_1_0] +== asciidoctor-go v0.1.0 (2021-03-06) The asciidoctor-go is the Go module to parse the AsciiDoc (TM) markup and convert it into HTML5. diff --git a/asciidoctor.go b/asciidoctor.go index 846c526..6e68f84 100644 --- a/asciidoctor.go +++ b/asciidoctor.go @@ -6,7 +6,7 @@ package asciidoctor import "github.com/shuLhan/share/lib/math/big" const ( - Version = "0.3.0-alpha" + Version = "0.3.0" ) func init() { |
