Commit graph

252 commits

Author SHA1 Message Date
Noah Hellman
845c56fd0b parser: test nested list 2023-02-05 20:36:40 +01:00
Noah Hellman
70d29c65e4 parser: determine tight vs loose lists 2023-02-05 20:36:40 +01:00
Noah Hellman
36470af114 tmp remove this 2023-02-05 20:36:40 +01:00
Noah Hellman
7b018ef10c todo: allow roman in alpha 2023-02-05 20:36:40 +01:00
Noah Hellman
83d569d09a fixup! 1669f0e97379fe38e7df6206d1e6815c5e8730fb 2023-02-05 20:36:40 +01:00
Noah Hellman
4ad7e2bf3e fixup! a931e71100663ece89f3c8dbfa67c02414d40436 2023-02-05 20:36:40 +01:00
Noah Hellman
1f71df82ef html: render lists, list items 2023-02-05 20:36:40 +01:00
Noah Hellman
2f616c41b7 parser: parse lists and list items 2023-02-05 20:36:40 +01:00
Noah Hellman
6befcad52a parse: merge enter / exit block events match branch 2023-02-05 20:36:40 +01:00
Noah Hellman
50632204a3 block: emit list events around list items 2023-02-05 20:36:40 +01:00
Noah Hellman
3123bd1a57 fixup! fix dbg print disp -> dbg 2023-02-05 20:36:40 +01:00
Noah Hellman
fb8a4c4a55 fixup! 427f999d61542d21221da4626ebbabb3ded51d63 2023-02-05 20:36:40 +01:00
Noah Hellman
5e8c683050 fixup! tree: add tree branch reference 2023-02-05 20:36:40 +01:00
Noah Hellman
a62eb3e1d8 fixup! e1843f1913dbbbc85414b05268ef554676168a6b 2023-02-05 20:36:40 +01:00
Noah Hellman
0f7ef85f6e fixup! add block parser in addition to block tree parser 2023-02-05 20:36:40 +01:00
Noah Hellman
7a5ef1e695 fixup! 6a1fcf07cc01a64ab2665cbe249bc5b047869e37 2023-02-05 20:36:40 +01:00
Noah Hellman
73baa48706 doc 2023-02-05 20:36:40 +01:00
Noah Hellman
d8aba07db3 fixup! wip 2023-02-05 20:36:40 +01:00
Noah Hellman
44a6961beb block: parse list item 2023-02-05 20:36:40 +01:00
Noah Hellman
7ce78f95fa block: trim inline indentation 2023-02-05 20:36:40 +01:00
Noah Hellman
b2d39e3ded lex: let closing BraceEqual have - after Hyphen seq
e.g. ---} -> -- + -} instead of --- + }
2023-02-05 20:36:40 +01:00
Noah Hellman
79e2eab107 fixup! inline: hide empty attributes from output 2023-02-05 20:36:40 +01:00
Noah Hellman
79dfd3be36 inline: do not merge discontinuous str
may appear when ignoring attributes
2023-02-05 20:36:40 +01:00
Noah Hellman
d3b2ee14cb amend! inline: hide empty attributes from output
inline: hide empty attrs, whitespace attrs from output

in order to allow comments
2023-02-05 20:36:40 +01:00
Noah Hellman
42ca801712 rm from_container_block 2023-02-05 20:36:40 +01:00
Noah Hellman
0e171c2cf2 html: filter out blanklines, escape
These are not visible, but the blankline breaks the peek for
End(Footnote) to detect whether to append the last paragraph with a
backreference link. A peek will now find the end event instead of an
invisible blankline.
2023-02-05 20:36:40 +01:00
Noah Hellman
8ccfb4c603 render footnotes 2023-02-05 20:36:40 +01:00
Noah Hellman
cbead322ed fixup! tree: add tree branch reference 2023-02-05 20:36:40 +01:00
Noah Hellman
726f1bc7b0 fixup! parser: impl link references 2023-02-05 20:36:40 +01:00
Noah Hellman
56190c4b0d fixup! parser: impl link references 2023-02-05 20:36:40 +01:00
Noah Hellman
ce6447476c fixup! parser: impl link references 2023-02-05 20:36:40 +01:00
Noah Hellman
412067a190 tree: add Branch::branch
will be used to defer inline parsing of footnotes
2023-02-05 20:36:40 +01:00
Noah Hellman
1dde9e57e2 borrow link def url if on single line 2023-02-05 20:36:40 +01:00
Noah Hellman
c7b3aa560b tree: add tree branch reference
allow multiple independent iterators for the same underlying tree

safety: not very good, but should work because original tree is kept in
Parser and branches are only used during its lifetime
2023-02-05 20:36:40 +01:00
Noah Hellman
4a7967812e lex: fix buggy peek 2023-02-05 20:36:40 +01:00
Noah Hellman
6af5c5c884 fixup! parse inline attrs 2023-02-05 20:36:40 +01:00
Noah Hellman
4fad0e9050 fixup! block attributes 2023-02-05 20:36:40 +01:00
Noah Hellman
ecf49100f4 fixup! parser: impl link references 2023-02-05 20:36:40 +01:00
Noah Hellman
6c5fcbf57d parser: impl link references 2023-02-05 20:36:40 +01:00
Noah Hellman
a4511db0a8 html: skip href attr when url empty 2023-02-05 20:36:40 +01:00
Noah Hellman
d3a98e6626 inline: impl empty link references tag
use text as tag
2023-02-05 20:36:40 +01:00
Noah Hellman
8c1d38fe12 tests suite: update tests from new djot impl repo
replace jgm/djot submodule with jgm/djot.js that contains newer tests
2023-02-05 20:36:40 +01:00
Noah Hellman
f80991d07a inline: hide empty attributes from output
allow comments
2023-02-05 20:36:40 +01:00
Noah Hellman
e6eb02ad03 fixup! inline: word attributes 2023-02-05 20:36:40 +01:00
Noah Hellman
064b4b1f88 inline: rename AttributesDummy -> Placeholder
allow general use
2023-02-05 20:36:40 +01:00
Noah Hellman
b512c670e6 attr valid: return whether attrs non-empty 2023-02-05 20:36:40 +01:00
Noah Hellman
161dfec96d inline: word attributes 2023-02-05 20:36:40 +01:00
Noah Hellman
5f9a72545b lib: raw blocks 2023-02-05 20:36:40 +01:00
Noah Hellman
b3896908a3 inline: trim verbatim whitespace 2023-02-05 20:36:40 +01:00
Noah Hellman
6e28b0e162 html: ignore attrs on inline quotes 2023-02-05 20:36:40 +01:00