package jingoo
Template engine almost compatible with Jinja2(python template engine)
Install
Dune Dependency
Authors
Maintainers
Sources
1.5.0.tar.gz
sha256=8c4ff32249549020871b8f7ab58e94075a1a492ead0aeb080a7323d89b1158ea
md5=3411c7091dcb8b0c7125d9ad2315a549
CHANGES.html
CHANGES
------------------------------------------------------------ "o": new feature "*": bug fixed "!": change that can break compatibility with older version ------------------------------------------------------------ version: 1.5.0, 2023-11-16 =========================== o [PR#132] Added `urlencode` filter. * [PR#125] Improve Tsafe support. * [PR#124] Fixed jg_highlight. o [PR#123] Defined `safe` filter as `jg_safe`. ! [PR#121] To match the official jinja2, rename filter `to_json` to `tojson`. o [PR#121] Support Tsafe value in jg_runtime. version: 1.4.4, 2021-09-04 =========================== o [PR#121] Added `to_json` filter. * [PR#120] Use Hashtbl.replace instead of Hashtbl.add in jg_init_context. ! [PR#119] Supports `set namespace[expr] = xxx` style syntax. version: 1.4.3, 2021-01-15 =========================== * Fixed jg_captalize(lowercase if it's not first letter). version: 1.4.2, 2020-11-15 =========================== o [ISSUE#116] Use character reference instead of character number in html escaping. o [PR#115] object(Tpat, Tobj, Thash) is merged as Tpat by jg_plus. version: 1.4.1, 2020-09-17 =========================== * [ISSUE#114] default filter is not usable. version: 1.4.0, 2020-06-19 =========================== o [ISSUE#112] Added new module Jg_template2(reviced version api). o [PR#113] Get the custom data from a function instead of an association list. version: 1.3.4, 2020-04-27 =========================== o [PR#111] Added new module(Jg_interp.Loaded) for loading templates for multiple evaluations. o [PR#110] Raise errors when macro gets called with unknown arguments. o [PR#109] Add support for capturing a block's output into a variable. o [PR#108] jg_runtime: added 'flatten' filter. version: 1.3.3, 2020-02-27 =========================== o [PR#107] Added support for PROFILE env variable setting dune --release option. o [PR#106] jg_unique: Added optional 'eq' parameter. o [PR#105] jg_list: support for Tobj, Added jg_unique filter. version: 1.3.2, 2019-12-11 =========================== * [PR#103] Update opam's build instructions. * [PR#102] Improved error messages. * [PR#100] Added the ternary operator. * [PR#99] Parser: auto trimming TEXT just after SWITCH token. * [Issues#101] Fix null comparison. version: 1.3.1, 2019-10-16 =========================== o [PR#97] Allow repeating macro name in endmacro part. o [PR#95] Support +=, -=, *=, /=, %= operator for 'set' statement. o [PR#93] Added anonymous functions. o [PR#94] Support 'else if'. * [PR#81] Parser enhancement(using menhir), tvalue unwrapping. * [PR#87] __eq__ field should return a boolean, not an int. * [PR#88] Fixed missing recursive call for ApplyExpr case. version: 1.3.0, 2019-02-08 =========================== o [PR#63] Dune build system, documentation and github pages. o [PR#64] Added jg_reject, jg_filter filter. o [PR#65] jg_range: generate an array instead of a list, and support char ranges. o [PR#66] Added jg_nth, jg_forall, jg_fold. o [PR#66] jg_plus(+ operator in template) supports array and list. o [PR#66] Some internal enhancements. * [PR#66] Fixed jg_slice. ! [PR#66] Rename jg_filter to jg_select, to avoid wired naming(filter filter). o [PR#67] Started writing documentation for template designers. * [PR#68] Fixed jg_fold for multi byte string. o [PR#69] Reworked Tfun to provide partial application for all functions. o [PR#71] Dead code elimination. New module jg_ast_optimize is added. o [PR#72] Function definition helpers: made function using kwargs the default, added _no_kw variants. o [PR#73] Rewrite Jg_utils.escape in a more efficient way. * [PR#73] Added escape for single quote(U+0027). ! [PR#74] Enhanced pretty-printer and added `pprint` filter. o [PR#75] Improved jg_urlize_regexp for real-world usage. o [PR#76] For loops: only declare 'loop' variable once instead of doing it for each iteration. * [PR#76] Fix jg_iter_str (unicode safe). o [PR#77] Added jg_printf function. o [PR#78] Added jg_compose, jg_exists function. version: 1.2.21, 2018-10-27 =========================== o [PR#55] type error messages enhancement. o [PR#56] Implemented jg_batch for arrays. o [PR#58] Added .gitattribute to provide .jingoo syntax highlight on github. o [PR#59] Added function ~ endfunction syntax. * [PR#60] Fix empty if branch trouble. o [PR#61] Switch from Pcre to Re. o [PR#62] jg_compare: fix list comparison, jg_sort: added ''compare" keyword argument. ! [ISSUE#57] Removed mutex lock. version: 1.2.20, 2018-09-25 =========================== ! Enabled to create curried function with keyword arguments. * Add 'uucp' to META. version: 1.2.19, 2018-09-20 =========================== o [PR#43] Added ast_mapper in order to implement optimization passes. o [PR#46,47] groupby filter support. o [PR#48] sort filter supports reverse and attribute keyword arguments. o [PR#49] min, max, nth support. o [PR#50] Improved UTF8 support. o [PR#53] map support. * [PR#54] Add support for empty else and a test for it. o [ISSUE#52] Rename default template extension from *.tmpl to *.jingoo. version: 1.2.18, 2018-07-24 =========================== o [PR#27] Avoid unnecessary buffer while parsing. * [PR#32] Handle whitespace control in lexer in order to avoid a ugly hack and Pcre use. o [PR#31] Added Tarray type. o [PR#33] Fixed lexer line update, better error message, fail on unclosed statements. o [PR#28] Added Tpat data structure: object base on string pattern matching. o [PR#34] Added Tlazy constructor. o [PR#36] Added Tvolatile contructor. o [PR#37] Optimize some operations on strings. * [PR#39] Fixed jg_is_true with float (used comparison with epsilon_float). * [PR#40] Treat Tnull iterable. o [PR#41] Added basic namespace support. o [ISSUE#23] Added strict_mode to environment. version: 1.2.17, 2018-07-03 =========================== o [PR#25] Add keywords 'and', 'or', 'elif'. * [PR#26] Make the lexer reject input when a keyword is expected but not found. version: 1.2.16, 2017-11-15 =========================== ! [PR#24] Drop support for 3.x because -safe-string(compiler option) is used by default since OCaml>=4.06.0. version: 1.2.15, 2017-07-24 =========================== * [ISSUE#23] Treat invalid iterable object as empty list. version: 1.2.14, 2016-12-16 =========================== o Update cheatsheet.tmpl(Add more '{% block %} ~ {% endblock %}' example code). ! Use labeled arguments for Jg_stub.add_func, Jg_stub.get_func. * Remove unused func and types. * [PR#21] Install .cmx files. * [PR#22] Add support for iterating over Tobj and Thash data. version: 1.2.13, 2016-05-10 =========================== ! [PR#20] Replace batteries to uutf. version: 1.2.12, 2015-12-05 =========================== * Use $(MAKE) instead of hard-coded make(PR#18) to support OSX and BSD via opam. version: 1.2.11, 2015-12-03 =========================== * If native compiler is not supported, bytecode library is automatically selected by opam(Issues#16, PR#17). version: 1.2.10, 2015-10-11 =========================== o Allow arbitrary expressions in object lookups(PR#15). version: 1.2.7, 2015-04-12 ========================== ! switch lib(extlib -> batteries). version: 1.2.6, 2014-08-14 ========================== ! deplicated compiled mode. o support symbol include like {% include some_var %}, {% rawinclude some_var %}. version: 1.2.5, 2014-08-01 ========================== o fix bug about recursive object lookup like {{ obj1.obj2.name }} version: 1.2.4, 2013-12-17 ========================== o replace UTF8 module from camomile to extlib. version: 1.2.3, 2013-?-? ========================== o support negative base for substring version: 1.2.3, 2013-11-14 ========================== o support syntax of white space control('{%-' and '-%}'). o port test to oUnit2. * fix META(switch link target whether '-thread' is anotated or not). version: 1.2.2, 2013-11-02 ========================== * remove some needless funcs. * fix bug about implicit file path. * fix bug about jg_default(order of argument invalid). version: 1.2.1, 2012-08-25 ========================== o disable auto convert from Tobj to Thash. version: 1.2.0, 2012-08-24 ========================== * fix trouble of duplicated funcs between std_func and std_test(upper, lower). o changed variable table from assoc list to Hashtbl for performance reason. o add new type Thash for faster object. now template models(Tobj) are automatically converted into Thash. version: 1.1.0, 2012-06-06 ========================== o license changed. now under MIT license. o new cmdline tool option "-interp". o support eval syntax(see cheatsheet.tmpl). version: 1.0.1, 2012-03-13: ========================== o add new syntax "rawinclude" version: 1.0.0, 2012-02-18: ========================== o first release
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>