Commit Graph

233 Commits

Author SHA1 Message Date
Michael Bayne 43a51b3235 Be more robust about closing template Reader.
Also some tidying: we don't like tabs or trailing whitespace.
2015-03-06 12:19:46 -08:00
Michael Bayne 6a02d434ec Merge pull request #62 from meros/master
Close readers provided by TemplateLoader.
2015-03-06 12:14:55 -08:00
Alexander Schrab 2ab053ce35 Close readers provided by TemplateLoader 2015-03-04 18:45:55 +01:00
Michael Bayne f24d4a7795 Reference 1.10 and via https. 2015-02-09 08:37:02 -08:00
Michael Bayne 978758fdde Disable some annoying Javadoc lint warnings. 2015-02-09 08:35:34 -08:00
Michael Bayne 2b006b06d0 [maven-release-plugin] prepare for next development iteration 2015-02-09 08:33:15 -08:00
Michael Bayne 2957516854 [maven-release-plugin] prepare release jmustache-1.10 2015-02-09 08:33:12 -08:00
Michael Bayne 9d8289caf0 Updated docs for whitespace+newline trimming. 2014-12-20 11:16:01 -08:00
Michael Bayne 17fe45ee8d Added a caveat default values.
I want to ensure the reader notes the difference between variables and
sections.
2014-12-20 11:10:10 -08:00
Michael Bayne 8618f89f7e Added strictSections configuration.
Section behavior used to be somewhat hackily determined from nullValue and
defaultValue, but it was messy. Now it has its own configuration and things are
more explicit.

Previously missing/null sections were treated as false, but if you set
nullValue to something, then missing sections became an error, but null
sections remained false. If you set defaultValue to something, missing sections
went back to being omitted. Kooky.

Now missing sections are omitted, unless you set strictSections to true, in
which case they become an error. nullValue and defaultValue have no impact on
section behavior.

There is no way to make null sections an error, but I don't see any demand for
that, so I'm going to leave that as a TODO.

Closes #60.
2014-12-20 11:06:46 -08:00
Michael Bayne 09fee0f037 Enabled more tests, fixed more bugs.
Mainly we also needed to trim around comment tags, but also there were a bunch
of tricky edge cases that were only partially addressed. This is some edgy
business!
2014-12-16 14:47:31 -08:00
Michael Bayne 0e2a7d13d5 Properly trim whitespace around delims tag.
This includes consolidation of other whitespace trimming to avoid duplication
with the delims trimming code.
2014-12-16 11:07:24 -08:00
Michael Bayne 4b3f677fbf Avoid freakoutery on invalid delims.
The specs tests assumes an implementation will silently ignore invalid delims.
I think that's a bad idea, so I throw an exception on invalid delims. So I just
ignore those "tests".
2014-12-16 11:06:39 -08:00
Michael Bayne c4cf51cf65 Escaped \r\n in all test checks. 2014-12-16 11:06:14 -08:00
Michael Bayne 6e53f924ba Enable more tests, we pass many of them. Woo!
This also improves failure reporting for specs tests.
2014-12-16 09:45:48 -08:00
Michael Bayne 79c7fd2cb0 Re-escape \r and \n in failure reports. 2014-12-16 09:45:48 -08:00
Michael Bayne ef4184404d Trim newlines from section tags with leading+trailing whitespace.
Other implementations apparently do it, and we have to keep up with the
Joneses.

Closes #59.
2014-12-16 09:45:37 -08:00
Michael Bayne 4cb0d876ed Rename test helper to not look like a test. 2014-12-13 15:26:51 -08:00
Michael Bayne 453d3928e5 Factor the tests a bit. 2014-12-06 12:53:18 -08:00
Michael Bayne b33bbda7d9 Label that bunch of mysterious ctor params. 2014-12-06 12:52:43 -08:00
Michael Bayne 692adc47f4 Move our GWT stuff around.
This avoids having it look like normal Java source and then confusing tools
because there are two copies of DefaultCollector.
2014-12-01 16:46:51 -08:00
Michael Bayne 614bb82b17 Handle CRLF in skipNewline mode. 2014-12-01 16:35:22 -08:00
Michael Bayne f838c91f99 Attempt to resolve compound keys "whole" first.
This allows one to have a map with keys like "foo.bar.baz" even when not in
standards mode. If a whole key is missing, then we attempt to decompose it and
look it up piecewise.

Closes #55.
2014-05-08 09:49:33 -07:00
Michael Bayne 2f267b7199 Make NO_FETCHER_FOUND available to external parties.
Closes #54.
2014-05-02 11:30:31 -07:00
Michael Bayne 20abde5b1a Expose the context to a lambda fragment.
This allows the lambda to take the context and turn around and render it using
a totally different template, if desired.
2014-04-16 14:26:22 -07:00
Michael Bayne 5bb76b0b51 Use latest sbt-pom-util plugin. 2014-04-16 14:26:07 -07:00
Michael Bayne 3c0c0f5b4a Yet more edits. 2014-03-31 10:02:15 -07:00
Michael Bayne 69c832a3ac More edits. 2014-03-31 10:01:15 -07:00
Michael Bayne a5a30fe5dc Minor edits. 2014-03-31 10:00:00 -07:00
Michael Bayne ec38ae2c80 Added details on thread-safety. 2014-03-31 09:57:42 -07:00
Michael Bayne 199ebf1f84 Use a copy of delims in the parser.
I don't know what madness overcame me when I thought it was a good idea to
mutate the compiler's delims during parsing and then restore them.
2014-03-31 09:41:02 -07:00
Michael Bayne 5ca07f70f0 Widened README to 100 columns.
Not sure why I had it at 80 before, though maybe I'm about to find out when I
push and the formatting is all hosed.
2014-03-18 09:29:30 -07:00
Michael Bayne 9861b54aa0 Formatting, and small javadoc improvement. 2014-03-18 09:26:38 -07:00
robbytx 75609b42df Add ability for lambda to change the context for fragment execution 2014-03-14 09:50:19 -05:00
Michael Bayne 3fe5e020d8 Factor exception wrapped read() into nextChar(). 2014-03-12 11:35:45 -07:00
Michael Bayne 8998b5f11e May as well report the bogus final char if we can. 2014-03-12 11:31:16 -07:00
Michael Bayne d1c8a665a9 Also, why add a brace and then remove it? 2014-03-12 11:23:16 -07:00
robbytx 5c3a93e079 Correct number of braces for error message 2014-03-12 11:21:17 -07:00
Michael Bayne df1cf9286f Override is good in code, a distraction in docs. 2014-03-11 07:47:11 -07:00
Michael Bayne b44e36f6c3 Invertable -> invertible here too. 2014-03-11 07:45:47 -07:00
Michael Bayne 59e06b24c9 Invertable -> invertible. Other minor tidying. 2014-03-11 07:43:44 -07:00
robbytx 2251ac1ed2 Add support for lambdas in inverse blocks 2014-03-10 17:06:21 -05:00
Michael Bayne aafa5c0a73 Update to more recent compiler plugin.
Also bumped source/target to 1.6. Hopefully this won't result in backlash from
cavemen still using JMustache on JDK 1.5.
2014-02-17 12:06:42 -08:00
Michael Bayne 93b66b757e More test coverage plus Coveralls wiring. 2014-02-17 12:02:41 -08:00
Michael Bayne 6b866d3263 Try wiring up Coveralls Maven plugin. 2014-02-17 11:54:17 -08:00
Michael Bayne 50416be2dc Reference 1.9 release. 2014-02-13 10:19:04 -08:00
Michael Bayne b618e6dbd4 [maven-release-plugin] prepare for next development iteration 2014-02-13 10:16:36 -08:00
Michael Bayne 834759d04c [maven-release-plugin] prepare release jmustache-1.9 2014-02-13 10:16:32 -08:00
Michael Bayne aaa4287837 Merge pull request #47 from egaga/patch-1
fixed documentation typo: reference `this´ instead of `self´
2014-01-29 10:28:54 -08:00
egaga b7a1a8c991 reference this´ instead of self´ 2014-01-29 13:51:02 +02:00