Commit Graph
69 Commits
Author SHA1 Message Date
HarttleandJun Yang a490a70da1 fix: consistent range syntax parsing, #791 2025-01-19 17:58:00 +08:00
Yang Jun d705888c8d feat: expose FilterToken to filter this, #762 2024-10-16 22:07:25 +08:00
Yang JunandJun Yang 6aeed2586a feat: support custom key-value separator, #752 2024-09-22 21:55:44 +08:00
Jun YangandGitHub c6a6ef1a1f chore: check node@14 on pipeline, #728 (#731) 2024-08-16 00:55:14 +08:00
Yang Jun 21a822348f fix: parser throws on non-string input, #726 2024-07-25 20:06:12 +08:00
Jun YangandGitHub e4aeb023fd feat: locale support for date filter, #567 (#723) 2024-07-22 00:39:44 +08:00
Yang Jun e443068cb9 feat: DoS prevention, #250 2024-07-09 22:51:11 +08:00
Jun YangandGitHub 3b5627b040 feat: support catching all errors, #220 (#710) 2024-06-17 22:48:57 +08:00
a0ea372764 docs: fix some spelling (#708)
* spelling: according

Signed-off-by: Josh Soref <[email protected]>

* spelling: asynchronously

Signed-off-by: Josh Soref <[email protected]>

* spelling: background

Signed-off-by: Josh Soref <[email protected]>

* spelling: camel

Signed-off-by: Josh Soref <[email protected]>

* spelling: cannot

Signed-off-by: Josh Soref <[email protected]>

* spelling: case-sensitive

Signed-off-by: Josh Soref <[email protected]>

* spelling: comparison

Signed-off-by: Josh Soref <[email protected]>

* spelling: demos

Signed-off-by: Josh Soref <[email protected]>

* spelling: forloop

Signed-off-by: Josh Soref <[email protected]>

* spelling: formatters

Signed-off-by: Josh Soref <[email protected]>

* spelling: github

Signed-off-by: Josh Soref <[email protected]>

* spelling: guidelines

Signed-off-by: Josh Soref <[email protected]>

* spelling: hashes

Signed-off-by: Josh Soref <[email protected]>

* spelling: https

Signed-off-by: Josh Soref <[email protected]>

* spelling: javascript

Signed-off-by: Josh Soref <[email protected]>

* spelling: keep

Signed-off-by: Josh Soref <[email protected]>

* spelling: natural

Signed-off-by: Josh Soref <[email protected]>

* spelling: neither

Signed-off-by: Josh Soref <[email protected]>

* spelling: no longer

Signed-off-by: Josh Soref <[email protected]>

* spelling: nonexistent

Signed-off-by: Josh Soref <[email protected]>

* spelling: output

Signed-off-by: Josh Soref <[email protected]>

* spelling: polymorphism

Signed-off-by: Josh Soref <[email protected]>

* spelling: precache

Signed-off-by: Josh Soref <[email protected]>

* spelling: programmatically

Signed-off-by: Josh Soref <[email protected]>

* spelling: punctuation

Signed-off-by: Josh Soref <[email protected]>

* spelling: registration

Signed-off-by: Josh Soref <[email protected]>

* spelling: rendered

Signed-off-by: Josh Soref <[email protected]>

* spelling: synchronously

Signed-off-by: Josh Soref <[email protected]>

* spelling: thrown

Signed-off-by: Josh Soref <[email protected]>

* spelling: trimmed

Signed-off-by: Josh Soref <[email protected]>

* spelling: unbalanced

Signed-off-by: Josh Soref <[email protected]>

* chore: use example.com

* chore: fix reference for sidebar.registration

---------

Signed-off-by: Josh Soref <[email protected]>
Co-authored-by: Harttle <[email protected]>
2024-06-17 17:19:46 +08:00
Jun Yang 2b713b721d feat: group_by/group_by_exp/find/find_exp from Jekyll, #443 2024-04-14 19:34:07 +08:00
Harttle dd7616acb9 fix: allow unicode to be identifiers, fixes #655 2023-11-04 21:33:29 +08:00
Jun YangandGitHub 660d9be55f feat: more flexible squared property read expression, fixes #643 (#646)
* fix: more flexible squared property read expression, fixes #643

* fix: unecessary error wrapping in browser bundles

* style: update code style and types

* perf: use token.value when evalToken
2023-08-23 00:45:49 +08:00
Jun YangandGitHub bf425c3adb fix: allow quotes in inline comment tag, fixes #628 2023-07-07 22:48:55 +08:00
HarttleandJun Yang e347e603d7 feat: precise line/col for tokenization Error, #613 2023-06-04 02:06:42 +08:00
HarttleandJun Yang 0480d3317d fix: proper error message for filter syntax error, #610 2023-06-04 02:06:42 +08:00
HarttleandJun Yang c6cde9cd10 chore: migrate test cases from Chai to Jest 2023-03-20 00:41:06 +08:00
HarttleandHarttle 3f21382d43 feat: support not operator, #575 2023-01-03 01:34:03 +08:00
Jun Yang 92992689cd refactor: Tag class support in registerTag() 2022-11-27 14:04:01 +08:00
Jun Yang bb58d3e549 refactor: delay creation of operatorsTrie and hide this implementation
BREAKING CHANGE: use `operators` instead of `operatorsTrie` as Tokenizer constructor argument, #500
2022-11-27 14:04:01 +08:00
HarttleandHarttle e874b4060b feat: export toValueSync & defaultOptions to evaluate expression, see #527 2022-08-15 01:53:48 +08:00
Harttle 3dc4290b56 fix: stack overflow on large number of templates, #513 2022-07-08 01:46:51 +08:00
jg-rpandGitHub 2f87708989 feat: inline comment tag (#514)
* style: remove unnecessary intermediate constant

* feat: add inline comment tag

* refactor: use readIdentifier when reading tag names

* docs: add inline comment tag
2022-07-08 01:46:15 +08:00
Harttle 01014edc49 feat: appropriate error for malformed filters, fixes #271 2022-03-05 23:24:16 +08:00
HarttleandHarttle 388d0fbbc4 feat: support Jekyll-like include syntax, see #441 2022-01-19 23:07:25 +08:00
Ameya ApteandJun Yang 7677f848c0 fix: remove limit on operator char length
The matchOperator function has a default value of str.length for the end parameter
2022-01-12 21:24:08 +08:00
James PriorandJun Yang fde9924ee6 feat: implement liquid and echo tags, see #428 2021-12-19 21:09:26 +08:00
HarttleandHarttle 23279a816a feat: support jekyll-like include, see #433 2021-12-18 15:26:15 +08:00
HarttleandHarttle 95fc705b5d chore: upgrade typescript 2021-12-11 20:23:09 +08:00
Harttleandharttle b5b2a98d5e chore: fix types 2021-10-16 22:36:46 +08:00
Harttleandharttle 8894cbfe6e fix: cache ongoing parseFile() calls, fixes #416 2021-10-16 21:07:48 +08:00
Harttle a3455ebd0b feat: relativeReference for render/include/layout, #395
- `relativeReference` is enabled by default, set to `false` to disable
- Referenced files are still constrained within root/partias/layouts
- fix: relative filenames are not constrained (which allows arbitrary filesystem read)

Example Usage:

{% render "../foo/bar.html" %}

Note:

../foo/bar.html' should also be within `partials` (or `root` if `partials` not set)
2021-10-06 17:36:37 +08:00
harttle b9ae479b65 feat: add layouts, partials apart from root, #395 2021-10-03 18:51:14 +08:00
Harttleandharttle 4358c9630f test: coverage to 100% 2021-10-01 15:55:31 +08:00
harttle 8273c17dab perf: parse filenames in parse() insteadof render() 2021-09-30 22:15:09 +08:00
Jun Yang 3e3d84a5ed fix: operator boundary not correctly recognized, fixes #342 2021-05-04 18:13:02 +08:00
harttle 2f059f6a25 feat: support filters in if/unless/case, see #287 2021-02-12 22:22:41 +08:00
Jason EtcovitchandJun Yang befc33c4eb feat: create trie programmatically in options 2021-02-04 09:11:28 +08:00
harttle 9c40da7369 fix: allow string literals contain delimiters, fixes #288 2021-01-24 12:49:19 +08:00
harttle f9f595f0f4 feat: passing liquid to FilterImpl, closes #277 2020-12-08 00:17:27 +08:00
harttle a492d8e23d fix: raw block not ignoring {% characters, fixes #263 2020-12-08 00:12:20 +08:00
wyoziandJun Yang e67c3c6924 Make end brace peek stricter and fix the test 2020-10-09 21:18:40 +08:00
wyoziandJun Yang 18a807ea2e fix: braced property access 2020-10-09 21:18:40 +08:00
harttle f3f017bd37 style: spaces and extra NL 2020-05-30 22:13:20 +08:00
harttle 8daf281fca fix: throw an error if : omitted unintentionally, #212, #208 2020-03-31 14:05:38 +08:00
harttle 1673e84e27 perf: remove instanceof DelimitedToken 2020-03-15 02:51:25 +08:00
harttle d2d6a38235 perf: introduce AST to avoid reparse 2020-03-15 02:51:25 +08:00
harttle f7ef9b61c1 refactor: remove src/render/value.ts 2020-03-14 19:04:18 +08:00
harttle 3dfdf982c9 perf: remove transient strings to reduce memory 2020-03-14 19:04:18 +08:00
harttle 6ea6881f08 feat: with & for in render tag, closes #195 2020-03-04 07:08:54 +08:00
harttle df8a919f71 feat: move filters/tags to instances, fixes #188 2020-03-03 00:02:29 +08:00