Commit graph

400 commits

Author SHA1 Message Date
Noah Hellman
a36cb74c66 add iai benchmarks 2023-02-14 21:51:23 +01:00
Noah Hellman
4f0be0c265 add criterion benchmarks 2023-02-14 21:51:23 +01:00
Noah Hellman
6ce49e1a71 add bench input crate
generate const strings to use as input in benchmarks
2023-02-14 21:51:23 +01:00
Noah Hellman
a3351d28b7 use bench instead of benches dir for benchmarks
in order to be able to place benchmarks in separate crates, if placed in
benches, they will be automatically considered part of the main crate

separate crates are needed to

- share generated input crate,
- avoid adding unused dependencies to tests
2023-02-14 16:31:58 +01:00
Noah Hellman
be63583257 rm unused benches/bench.sh script 2023-02-14 16:31:58 +01:00
Noah Hellman
0fa0f8fd5b PR #13 Setup CI
closes #9
closes #13
2023-02-14 16:15:48 +01:00
Noah Hellman
01d8c0015e ci: add afl fuzz stage
fuzz for 1 min to quickly detect e.g. incorrect asserts
2023-02-13 18:16:34 +01:00
Noah Hellman
fb663da761 modules/djot.js: ssh -> https
github ci does not like ssh
2023-02-13 18:13:48 +01:00
Noah Hellman
ab8412ed4e add github ci script 2023-02-13 18:13:48 +01:00
Noah Hellman
119f59b349 test suite: skip rustfmt on generated modules
may not exist or have trailing newline
2023-02-12 00:59:18 +01:00
Noah Hellman
619c5ef048 test suite: add test skip/ignore/blacklist
some unit tests are not passing, ignore them for now in order to allow
testing for regressions for the currently passing tests.

run ignored tests with

cargo test --features suite -- --ignored
2023-02-12 00:59:18 +01:00
Noah Hellman
1221a003ba test suite: use md5 of input as test name
in order to keep same name, if order of test would change
2023-02-12 00:59:18 +01:00
Noah Hellman
38666a86f8 suite_bench: add bench input skip/ignore/blacklist
some benchmark input files have different output from reference
implementation, ignore them for now in order to allow testing for
regressions for the currently passing inputs.

run ignored tests with

cargo test --features=suite_bench -- --ignored
2023-02-12 00:59:18 +01:00
Noah Hellman
c3ff064c78 make Event::is_{,container_}block public
this is only used by html renderer, may be useful for other renderers
also
2023-02-12 00:59:18 +01:00
Noah Hellman
413fecfe6a fix/allow clippy lints 2023-02-12 00:59:18 +01:00
Noah Hellman
a6ad7a9d58 workspace: exclude jotdown-afl
does not build without nightly
2023-02-12 00:59:18 +01:00
Noah Hellman
0ddf2ba61f make: add all, docs, check, lint targets 2023-02-12 00:59:18 +01:00
Noah Hellman
ff6f1554e2 test suite: use new render html api 2023-02-11 20:23:00 +01:00
Noah Hellman
77f4a9114a PR #12
Close #12
2023-02-11 10:59:26 +01:00
Noah Hellman
6c50e7cb79 PR #8
Close #8
2023-02-11 10:24:00 +01:00
kmaasrud
d7f2c0a819 implement Render trait for html::Renderer 2023-02-10 09:46:18 +01:00
kmaasrud
4743781cb9 add Render trait 2023-02-10 09:45:43 +01:00
kmaasrud
896c7004c4 add input and output args to CLI
This commit also adds a help text, accessible with the `--help` flag, as
well as a version text, available by using `--version`. My hope is that
this commit will make the jotdown CLI a bit friendlier to use.
2023-02-08 22:43:07 +01:00
Noah Hellman
b572790ac9 bug: fix tightness, ignore end blanklines 2023-02-07 21:51:31 +01:00
Noah Hellman
0d560901eb block: add Element::list 2023-02-07 21:49:35 +01:00
Noah Hellman
f98ebd477f bug: fix indent of footnote/list inner
when starting multiple blocks on same line, e.g. inner part of

    - - a
      - b

was

     - a
      - b

instead of

     - a
     - b
2023-02-06 23:09:48 +01:00
Noah Hellman
ac88c23d66 fixup! test suite: add djot.js bench files as tests 2023-02-06 23:09:48 +01:00
Noah Hellman
c518d150ad fixup! add spec tests 2023-02-06 23:09:48 +01:00
Noah Hellman
42360d7001 fixup! block: add MeteredBlock as intermediate struct 2023-02-06 23:09:48 +01:00
Noah Hellman
e9feeb73c1 Release 0.1.0 2023-02-06 18:38:51 +01:00
Noah Hellman
34452a282a features: add flag for html module 2023-02-05 21:59:38 +01:00
Noah Hellman
f4d8aee4cc add README.md 2023-02-05 21:59:38 +01:00
Noah Hellman
83eebf369d add MIT license 2023-02-05 20:41:59 +01:00
Noah Hellman
5a882764f7 examples: add wasm online demo 2023-02-05 20:41:59 +01:00
Noah Hellman
908ba72812 test suite, suite bench: update djot.js module 2023-02-05 20:36:49 +01:00
Noah Hellman
0de7776020 impl Clone, Copy on public objects 2023-02-05 20:36:49 +01:00
Noah Hellman
477eadde1c document lib API 2023-02-05 20:36:49 +01:00
Noah Hellman
5efb700c9b move atomic events to Event from Atom
An additional Atom enum seems to be more cumbersome and add little
value.

methods could potentially be used to classify events in several ways,
e.g.  block vs inline, atomic vs container
2023-02-05 20:36:49 +01:00
Noah Hellman
2811493c34 html: do not emit newline in beginning 2023-02-05 20:36:49 +01:00
Noah Hellman
7a26476315 fixup! wip djot -> html 2023-02-05 20:36:49 +01:00
Noah Hellman
0420aad0a5 implement symbols
e.g. :some-sym:
2023-02-05 20:36:49 +01:00
Noah Hellman
61f0d6281e rm unused 2023-02-05 20:36:49 +01:00
Noah Hellman
cc5a196149 fixup! parse block elements 2023-02-05 20:36:49 +01:00
Noah Hellman
cc89a06964 fixup! fixup! test_parse, test_block 2023-02-05 20:36:49 +01:00
Noah Hellman
fbd8811c86 block: parse description list 2023-02-05 20:36:49 +01:00
Noah Hellman
95bf52a31e update tree 2023-02-05 20:36:49 +01:00
Noah Hellman
768699d138 optionally use btree maps instead of hash maps
btree maps are deterministic which is useful for fuzzing. hash maps,
however have better performance in our case
2023-02-05 20:36:49 +01:00
Noah Hellman
fc96f3408f make: add cov recipe 2023-02-05 20:36:49 +01:00
Noah Hellman
924d6c44ac inline: disallow '<' in autolinks
avoid hangs on long <<<<<< sequences
2023-02-05 20:36:49 +01:00
Noah Hellman
82adc631d9 allow attributes on thematic breaks 2023-02-05 20:36:49 +01:00