-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCHANGELOG
588 lines (434 loc) · 13.2 KB
/
CHANGELOG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
// SPDX-FileCopyrightText: 2021 M. Shulhan <[email protected]>
// SPDX-License-Identifier: GPL-3.0-or-later
= Changelog for asciidoctor-go
Shulhan <[email protected]>
:toc:
:sectlinks:
[#v0_6_2]
== asciidoctor-go v0.6.2 (2025-02-01)
[BUG FIX]
Fix section detected as paragraph after list and comment.
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.
[CHORE]
In the linter, we replace the fieldalignment and shadow using our internal
gocheck command.
This linters actually have an API that can be combined into a program,
which provided by package "pakakeh.go/lib/goanalysis".
[#v0_6_1]
== asciidoctor-go v0.6.1 (2024-12-08)
[#v0_6_1__bug_fixes]
=== Bug fixes
all: fix error log when failed to open included file::
+
The log use the wrong variable when printing path for failed include
file.
all: fix reading include file when parent path is absolute::
+
Previously, if the parent document is opened using absolute path and
it contains include directive, the included file will fail to read
because the parent path is joined with current working directory.
[#v0_6_0]
== asciidoctor-go v0.6.0 (2024-09-07)
[#v0_6_0__breaking_changes]
=== Breaking changes
all: rename struct "AttributeEntry" to "DocumentAttribute"::
+
This is to make the struct is clear that it represent the document
attribute.
all: rename struct "AttributeEntry" to "DocumentAttribute"::
+
This is to make the struct is clear that it represent the document
attribute.
all: refactoring DocumentAttribute into struct::
+
Using struct limit the value to only string, while some attributes
can be an integer value, for example "leveloffset".
[#v0_6_0__new_features]
=== New features
all: support document attribute "leveloffset"::
+
--
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/
--
[#v0_6_0__enhancements]
=== Enhancements
all: use strict document header format::
+
--
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.
--
all: remove unnecessary TrimRight::
+
Each lines to be parsed has been trimmed on the first load, so
there is no need to do it again, on some cases.
[#v0_5_2]
== asciidoctor-go v0.5.2 (2023-04-04)
This release only contains chores.
all: replace module "share" with "pakakeh.go"::
+
--
The "share" module has been moved to new repository with new name at
"https://sr.ht/~shulhan/pakakeh.go".
For more information see the change logs at "pakakeh.go" module.
--
all: comply with linter recommendations::
+
Most of the code changes related to refactoring if-else witch switch
statement.
all: replace if-else bytes.Equals with static string case comparisons::
+
Using string instead of [bytes.Equal] give code much more readable.
[#v0_5_1]
== asciidoctor-go v0.5.1 (2023-12-14)
[#v0_5_1__bug_fixes]
=== Bug fixes
all: fix custom IDs on first section always got replaced::
+
--
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.
--
[#v0_5_1__chores]
=== Chores
all: replace "lib/parser" with "strings/parser"::
+
The lib/parser has been deprecated in share module.
all: remove dependency to "git.sr.ht/~shulhan/pakakeh.go/lib/debug"::
all: replace linter golangci-lint with revive and shadow::
+
--
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.
--
[#v0_5_0]
== asciidoctor-go v0.5.0 (2023-06-04)
[#v0_5_0__new_features]
=== New features
all: add support for unordered list with '-'::
+
--
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
--
[#v0_5_0__bug_fixes]
=== Bug fixes
all: fix rendering blockquote without attribution::
+
--
Previously, in the htmlWriteBlockQuoteEnd, if attribution is set
we add HTML tag <div> and close it later after we add citation.
The issue is we did not check if attribution is true again when we
add closing tag for div, which make the div above of blockquote get
closed.
--
all: handle custom marker in between unordered list::
+
--
Given the following markup,
----
[square]
* item 1
[circle]
** item 2
----
The list on item 2 now start with `<div class="ulist circle">`.
--
[#v0_4_1]
== asciidoctor-go v0.4.1 (2023-03-03)
[#v0_4_1__bug_fixes]
=== Bug fixes
all: fix empty line printed on ToHTMLBody or ToHTMLEmbedded::
+
--
Given the following adoc,
----
= T
----
If we call ToHTMLBody, the output is
----
(empty line here)
<div id="header">
<h1>T</h1>
----
This changes remove the empty line at the top.
--
all: ignore parsing block image in paragraph::
+
--
Previously, if we have block image in paragraph, we parse it as inline
image but with invalid src, for example
----
image::my.png[multi
line].
----
would be parsed as <img src=":imy.png" alt="multi line">.
This is incorrect according to asciidoctor output.
--
[#v0_4_1__enhancements]
=== Enhancements
all: handle empty preamble::
+
If the document contains empty preamble do not output the HTML wrapper of it.
[#v0_4_0]
== asciidoctor-go v0.4.0 (2023-02-12)
[#v0_4_0_new_features]
=== New features
all: add support for document attribute "last-update-label"::
+
--
By default the last-update-label value set to "Last updated" and the value is
the document modification time.
If the label is suppressed with "!", no "Last updated" will be print on the
footer.
--
all: implement inline macro for passthrough ("pass:")::
+
--
The inline passthrough "pass:" can be used to control the substitutions
applied to a run of text.
Ref: https://docs.asciidoctor.org/asciidoc/latest/pass/pass-macro/
--
all: implement macro "footnote:"::
+
--
Macro footnote grammar,
----
"footnote:" [ REF_ID ] "[" STRING "]"
----
In asciidoctor, footnote can be placed anywhere, even after WORD without
space in between.
The REF_ID, define the unique ID for footnote and can be used to reference
the previous footnote.
The first footnote with REF_ID, should have the STRING defined.
The next footnote with the same REF_ID, should not have the STRING
defined; if its defined, the STRING is ignored.
--
[#v0_4_0_bug_fixes]
=== Bug fixes
all: detach parsing preamble from content::
+
This is to prevent empty preamble being rendered in HTML content.
all: fix the orders of generated HTML meta::
+
--
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!".
--
[#v0_4_0_enhancements]
=== Enhancements
all: support multi line attribute values::
+
If the attribute value end with backslash '\\', the value continue to the
next line.
[#v0_3_2]
== asciidoctor-go v0.3.2 (2022-09-05)
[#v0_3_2_bug_fix]
=== Bug fix
all: fix parsing list description inside include directive::
+
--
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.
--
[#v0_3_2_chores]
=== Chores
all: update share module to v0.41.0::
all: move all documentation into directory _doc::
+
While at it reformat the README, add section for development, add
link for Go documentation.
[#v0_3_1]
== asciidoctor-go v0.3.1 (2022-08-06)
[#v0_3_1_chores]
=== Chores
all: rewrite unit tests for inlineParser using test.Data::
+
--
Using string literal for testing string input that may contains backtick
or double quote make the test code become unreadable and hard to modify.
The test.Data help this by moving the input and expected output into
a file that can we write as is.
--
all: cleaning up codes:: Use raw string literal whenever possible.
go.mod: update share to v0.40.0::
+
--
This update fix some issues related to new line on test.Data.
--
[#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.
[#v0_2_0_bug_fixes]
=== Bug fixes
all: fix list check box text get cut one character::
+
--
Given the following asciidoc check box markup,
* [ ] abc
It will rendereded as "❏ bc" instead of "❏ abc".
--
[#v0_2_0_chores]
=== Chores
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.
--
[#v0_1_1]
== asciidoctor-go v0.1.1 (2021-12-06)
[#v0_1_1_bug_fixes]
=== Bug fixes
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.
The bug is when ID is set manually and its contains upper-case for
example "[#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.
--
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
--
[#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.
This first release bring almost all AsciiDoc syntax except for include
directive, inter-document cross-reference, macros, and non-primary syntax
features.
I hope this library can be useful for Gophers who need the power of AsciiDoc
in their workflows.