Skip to content

Commit

Permalink
prepare release 2.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
chbloemer committed Jan 10, 2025
1 parent 4fe1a6f commit 0e8d863
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 4 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# History
## 2.3.1 / 2025-01-10
* Fixed issue #32 Reduce number of ignored NumberFormatExceptions in PugJexlArithmetic#add operation (thanks to Selaron)
* Fixed issue #33 Attributes Block is not rendered completely in HTML

## 2.3.0 / 2025-01-04
* Updated GraalJS to 21.3.12 (fixes runtime errors on jdk 9+ when using GraalJSExpressionHandler)
* Updated to jexl 3.4
Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
pug4j's intention is to be able to process pug templates in Java without the need of a JavaScript environment, while being **fully compatible** with the original pug syntax.

pug4j was formerly known as jade4j. Because of the naming change of the javascript version and the alignment to the featureset of pug.js (https://pugjs.org/) we decided to switch the name.

With the addition of a new [GraalJsExpressionHandler](#graalvm) your code can be more compatible to the js version than before.

## Contents

- [Example](#example)
Expand Down Expand Up @@ -88,7 +87,7 @@ Just add following dependency definitions to your `pom.xml`.
<dependency>
<groupId>de.neuland-bfi</groupId>
<artifactId>pug4j</artifactId>
<version>2.3.0</version>
<version>2.3.1</version>
</dependency>
```

Expand Down Expand Up @@ -300,13 +299,13 @@ book["size"] // works
You can read more about this in the [JEXL documentation](https://commons.apache.org/proper/commons-jexl/reference/syntax.html#Language_Elements).

<a name="graalvm"></a>
### GraalVM Expressionhandler (NEW! since 2.0.0)
If you want to use pure javascript expression handling, you can try out the new GraalJS Expression Handler. It supports native javascript expressions but is slower than the Jexl Expression Handler. You can configure it like this:
### GraalVM Expressionhandler (NEW! since 2.0.0 / experimental!)
If you want to use pure javascript expression handling, you can try out the new GraalJS Expression Handler. It supports native javascript expressions but is slower (really slow!) than the Jexl Expression Handler. You can configure it like this:

```java
PugConfiguration config = new PugConfiguration();

config.setExpressionHandler(new GraalJsExpressionHandler())
config.setExpressionHandler(new GraalJsExpressionHandler());
```


Expand Down

0 comments on commit 0e8d863

Please sign in to comment.