Noah Hellman
72a3378831
attr: use bytes instead of chars
...
only consider ascii whitespace
2023-05-16 17:01:42 +02:00
Noah Hellman
d43d6c908f
attr: valid, ret byte len not char count
2023-05-16 17:01:42 +02:00
Noah Hellman
599b712f36
attr: rm unused ret bool from valid
2023-05-16 17:01:42 +02:00
Noah Hellman
1202160a88
inline: resume attr parsing when new lines received
...
instead of starting over for each new line
2023-04-05 21:17:33 +02:00
Noah Hellman
62d33effc4
inline: parse multiline attributes
...
reimplement after broken by "take str per line instead of full inline
iter" commit
also resolves #18 and #34
2023-04-05 21:17:33 +02:00
Noah Hellman
98f3fe5c7c
attr: Parser overhaul
...
- allow reading one line at a time, values may span multiple inputs
- mv event push to Parser, allowing reuse from outside Attributes::parse
- get rid of Element, simplify
2023-04-05 21:17:33 +02:00
Noah Hellman
34e74ddc43
attr: impl valid without Parser
...
only State fsm is needed
try to use Parser only when attributes need to be stored
2023-04-05 21:17:33 +02:00
Noah Hellman
242a64e3b4
attr: mv wildcard State use to Parser methods
...
avoid potential name conflict
2023-04-05 21:17:33 +02:00
Noah Hellman
172f555272
attr: step one char at a time
...
make sure attr can keep track of all state so one char can be provided
at a time
this allows not restarting from beginning if we find out we need more
chars to finish parsing attributes
2023-04-05 21:17:33 +02:00
Noah Hellman
e1b12ba642
attr: rename State::{Attribute->Key}
...
more accurate name
2023-04-05 21:17:33 +02:00
Noah Hellman
3a1a3996e9
inline: take str per line instead of full inline iter
...
gets rid of DiscontinousChars which is large and requires cloning on
peek
resolves #4
2023-04-05 21:17:33 +02:00
Noah Hellman
f31398a796
attr: impl Debug for Attributes manually
...
show key value pairs instead of internal structure
2023-04-05 21:17:33 +02:00
Noah Hellman
14065177ae
attr: fix name/key/value validation
...
match reference implementation
2023-03-17 18:57:36 +01:00
kmaasrud
e3f39d4b88
feat: support escapes in attributes
...
Related issue: #1
2023-03-12 08:19:56 +01:00
Noah Hellman
413fecfe6a
fix/allow clippy lints
2023-02-12 00:59:18 +01:00
Noah Hellman
4cb9c07cfc
fixup! block attributes
2023-02-05 20:36:49 +01:00
Noah Hellman
6a94e694f9
block: enforce valid div classes
2023-02-05 20:36:40 +01:00
Noah Hellman
30351500bb
fixup! attr valid: return whether attrs non-empty
2023-02-05 20:36:40 +01:00
Noah Hellman
60dcf09c1a
impl automatic heading identifiers
2023-02-05 20:36:40 +01:00
Noah Hellman
451b2360f4
fixup! parser: apply link def attrs to link
2023-02-05 20:36:40 +01:00
Noah Hellman
2e4a9147aa
parser: apply link def attrs to link
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
eb6b58f2a9
fixup! block attributes
2023-02-05 20:36:40 +01:00
Noah Hellman
8d676e1431
parse inline attrs
2023-02-05 20:36:40 +01:00
Noah Hellman
1586c2947f
fixup! block attributes
2023-02-05 20:36:40 +01:00
Noah Hellman
9dd10a558f
fixup! block attributes
2023-02-05 20:36:40 +01:00
Noah Hellman
d8d464902a
wip fix span / typeset precedence
2023-02-05 20:36:40 +01:00
Noah Hellman
352be02ccf
block attributes
2023-02-05 20:36:40 +01:00