Scott Embler
8cc0b7c2c7
Merge pull request #184 from obecker/contributing-fix
...
Adjust CONTRIBUTING.md to the latest code changes
2021-06-07 18:25:58 -04:00
Oliver Becker
89f0194be0
Adjust CONTRIBUTING.md to the latest code changes
...
IInstance.get() has been renamed to self() in https://github.com/tipsy/j2html/pull/180
2021-06-07 17:43:35 +02:00
Scott Embler
1079a01750
Merge pull request #182 from obecker/each-fix
...
Remove calls to render() during tree construction.
2021-06-05 13:42:53 -04:00
Oliver Becker
f89957eeab
Fix implementation flaw that called render() during tree construction
...
* Enables the new render capabilities also for content that was constructed with
- TagCreator.each(Map, Function) and
- TagCreator.each(Map, BiFunction)
* Adds convenience method TagCreator.each(DomContent...)
2021-06-04 15:57:16 +02:00
Scott Embler
c07facd490
Merge pull request #181 from sembler/fix_style_and_script_escaping
...
Treating text as unescaped when using TagCreator methods for style and script elements.
2021-06-03 10:24:45 -04:00
Scott.Embler
1d43a25457
Treating text as unescaped when using TagCreator methods for style and script elements.
...
- Replicating PR #152 , but avoiding conflicts and using more current conventions.
2021-06-02 13:32:37 -04:00
sagesmith-wf
2ecd734239
Make join method work as expected ( #168 )
...
- Avoids appending a delimiter to the end of the joined text.
- Add test to verify changes.
2021-06-02 10:11:44 -04:00
Scott Embler
8b2669cab1
Merge pull request #180 from obecker/polish-code
...
Minor code improvements
2021-05-21 19:39:02 -04:00
Oliver Becker
8c0d03e200
Minor code improvements
...
* add compiler flag -Xlint:all, resolve all warnings about unchecked or raw generics
* rename IInstance.get() to IInstance.self() because it better reflects its intention
* move MainTag from manual to generated tags
* remove unnecessary type casts in TagCreator
2021-05-21 12:36:51 +02:00
Scott Embler
15702ac0d7
Extracted rendering functionality into implementations of HtmlBuilder. ( #179 )
...
* Extracted rendering functionality into implementations of HtmlBuilder.
- Two HtmlBuilders are implemented, FlatHtml and IndentedHtml. Each offers the equivalent output as ContainerTag.render() and ContainerTag.renderFormatted.
- Existing implementations of DomContent/Renderable were updated to support HtmlBuilder where possible.
- Attribute was altered to support the use of TagBuilder.
- Config was altered to allow instances to be created, which can be passed into factory methods for the HtmlBuilders. Config.defaults() can be used for library defaults, while Config.global() can be used for current static configuration.
- Retained compatibility with previous library version as much as possible. See RenderingCompatabilityTest.
* Fixing unchecked or unsafe operations
* Removing unnecessary @param from javadoc.
* Improving casting of HtmlBuilders in implementations of DomContent (tags, text, etc.).
* Preventing NPEs when text is null.
Co-authored-by: Oliver Becker <ob@obqo.de >
2021-05-20 10:47:06 -04:00
Scott Embler
fd41cccfe2
Merge pull request #176 from obecker/intellij
...
Add .idea folder to .gitignore for developers using IntelliJ IDEA
2021-04-25 10:11:57 -04:00
Oliver Becker
31a565235e
Add .idea folder to .gitignore for developers using IntelliJ IDEA
2021-04-25 10:32:23 +02:00
Oliver Becker
da76ee0d2b
Fix indent of tags without tag name when using renderFormatted() ( #174 )
...
https://github.com/tipsy/j2html/issues/173
Off topic: Set execute flag on mvnw
2021-04-24 21:52:50 +02:00
Scott Embler
4a4c6314d8
Minor restructuring of Tag internals, increased argument validation, and tests to clarify current behavior. ( #175 )
...
Co-authored-by: Scott.Embler <scott.embler@noaa.gov >
2021-04-24 11:37:00 +02:00
pointbazaar
be626b6b96
completely separate the generated interfaces from manual ones and completely separate the manual tags from the generated ones. Also wipe the directories for code generation before code generation ( #167 )
2020-10-20 10:52:38 +02:00
dependabot[bot]
226cfb9a28
Bump junit from 4.11 to 4.13.1 in /code_gen ( #166 )
...
Bumps [junit](https://github.com/junit-team/junit4 ) from 4.11 to 4.13.1.
- [Release notes](https://github.com/junit-team/junit4/releases )
- [Changelog](https://github.com/junit-team/junit4/blob/main/doc/ReleaseNotes4.11.md )
- [Commits](https://github.com/junit-team/junit4/compare/r4.11...r4.13.1 )
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-17 10:25:29 +02:00
pointbazaar
acf6bff72a
Split j2html in 2 projects, "code_gen" and "library" (Issue #161 ) ( #165 )
...
* split the project in 2, to make it easier to iterate on the code generation without breaking the build. This could also help reduce the compiled size of the library.
* update CONTRIBUTING.md
* try to fix github workflow
2020-10-17 10:23:57 +02:00
dependabot[bot]
07427c1433
Bump junit from 4.12 to 4.13.1 ( #164 )
...
Bumps [junit](https://github.com/junit-team/junit4 ) from 4.12 to 4.13.1.
- [Release notes](https://github.com/junit-team/junit4/releases )
- [Changelog](https://github.com/junit-team/junit4/blob/main/doc/ReleaseNotes4.12.md )
- [Commits](https://github.com/junit-team/junit4/compare/r4.12...r4.13.1 )
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-13 15:10:36 +02:00
lambdaupb
7d98d4f2bd
Escape Attribute on render instead of in constructor. Fixes #160 ( #162 )
...
Also initialize EscapeUtil StringBuilder with input length to avoid growing copying.
2020-09-24 08:50:01 +02:00
lambdaupb
94ad6e29a3
Use one Appendable instance that is passed down for all rendering ( #158 )
2020-09-23 20:53:32 +02:00
pointbazaar
9338efc7cd
Add CONTRIBUTING.md (depends on PR156) ( #157 )
...
* start on CONTRIBUTING.md
* Update CONTRIBUTING.md
* Update CONTRIBUTING.md
2020-08-31 16:24:44 +02:00
pointbazaar
312cabe69c
Implementation of Attributes-per-Tag via Interfaces ( #156 )
2020-08-31 16:24:00 +02:00
pointbazaar
f091000bbe
first iteration of the attribute per tag POC ( #154 )
...
* create HtmlTag, BodyTag, HeadTag. hopefully without too large diffs this time.
* add some forgotten variants
* remove 'final' on some methods changed during the last 2 commits, to make it more consistent with the rest of the code
* remove <head>,<body>,<html> from TagCreatorCodeGenerator
2020-08-16 10:39:13 +02:00
David
2ae40f9e6c
Update README.md
2020-08-15 17:38:58 +02:00
David
dd2079a136
add github ci workflow
2020-08-15 17:35:47 +02:00
David
b0cf8e8c6f
add maven wrapper
2020-08-15 17:34:50 +02:00
David
793dcca03c
remove travis file
2020-08-15 17:32:54 +02:00
pointbazaar
379ddb82bf
Remove test dependency lombok
...
* lombok was almost never used. also gave me errors on 'mvn install' on ubuntu 20.04 https://github.com/rzwitserloot/lombok/issues/1651 . unless there are plans to use it more extensively, maybe it is best to remove it, to clean up the dependencies and enable me (and maybe others) to build without errors.
* fix Employee.java without lombok
2020-08-15 10:31:25 +02:00
Arne Zelasko
8316035854
add step attribute ( #150 )
2020-05-19 19:10:21 +02:00
b-gyula
1fcecb961e
#145 override toString calling render() allowing inline usage: ( #146 )
...
```
String content = "Some content already generated";
content += tr(th("Name"),th("Desc")) + "some other content";
```
2020-02-06 12:28:01 +01:00
Jamie Mansfield
5c9d62cdf3
bug-fix: Children of non-formatted tags ( #139 )
...
Resolves GH-138.
2019-09-14 00:29:55 +02:00
David
c31badd3e4
Update .travis.yml
2019-09-13 23:46:39 +02:00
labkey-matthewb
629038303c
remove private constructor from Attr ( #134 )
2019-06-04 20:49:35 +02:00
mbellew
0f30bc9d9a
generalize addTo() to enable other attr helpers besides ShortForm ( #133 )
...
* small changes to make for easier experimentation
* generalize addTo() to enable other attr helpers besides ShortForm
2019-05-31 23:28:56 +02:00
mbellew
ae65127dcc
small changes to make for easier experimentation ( #132 )
2019-05-31 23:20:10 +02:00
David
dae578a523
Bump version in readme
2019-01-24 14:49:40 +01:00
David
b89435ca7c
Cleanup after tests
2019-01-24 14:49:13 +01:00
David
3deb6b4ddb
[maven-release-plugin] prepare for next development iteration
2019-01-24 14:43:12 +01:00
David
023922a7db
[maven-release-plugin] prepare release j2html-1.4.0
j2html-1.4.0
2019-01-24 14:42:55 +01:00
David
00c0461669
Auto format project
2019-01-24 14:24:21 +01:00
Robin Karlsson
cd6e0084ef
Add Stream<DomContent> variants of each and with ( #118 )
2018-05-20 21:45:36 +02:00
Moandji Ezana
764b5d7759
Add TagCreator::each(Map, BiFunction) ( #115 )
2018-05-07 00:18:36 +02:00
David
d9c4963ff0
bump version
2018-05-01 12:29:02 +02:00
David
3ec15d28a5
woops
2018-05-01 12:28:13 +02:00
Moandji Ezana
f1680464d1
Do not indent textarea contents ( #113 )
...
* Do not indent textarea contents.
Fixes #102
* Restore import style
* Handle <pre> and TagCreator::each
2018-05-01 02:06:45 +02:00
Matthias
f497b5c8b5
support osgi meta data ( #112 )
2018-04-17 23:54:31 +02:00
Matthias
f212895eb2
Let each() take Map in addition to Collection ( #110 )
...
* add support for maps for 'each' method.
* add missing imports.
2018-04-16 20:11:37 +02:00
Rupert Madden-Abbott
62cafb9b31
Allow nulls in join() ( fix #109 )
...
* Discard nulls in join.
* Add test.
2018-04-16 20:07:11 +02:00
David
af7c986dd6
reorder asserts in each/fitler test
2018-02-05 01:36:46 +01:00
David
3aaab8b0fe
unignore tests
2018-02-05 01:34:45 +01:00