Skip to content

Commit 309c7d3

Browse files
committed
[fj-mod-doc-fop] error if a element <phrase> is inside a <cell> (fix) #426
1 parent f897dbc commit 309c7d3

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
- [CHORE]: 'direct' goal + 'add' / 'init' configure support for extra modules <https://github.com/fugerit-org/fj-doc/pull/424>
1313

14+
### Fixed
15+
16+
- [BUG]: [fj-mod-doc-fop] error if a element <phrase> is inside a <cell> <https://github.com/fugerit-org/fj-doc/pull/426>
17+
1418
## [8.13.9] - 2025-04-28
1519

1620
### Changed

fj-doc-mod-fop/src/main/resources/fj_doc_mod_fop_config/template/macro/doc_element.ftl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
<fo:table-cell<#if (cell.backColor??)> background-color="${cell.backColor}" </#if><@addCssValue name='padding' value=docTable.padding def=0 unit='mm'/><@addCssValue name='margin' value=docTable.padding def=0 unit='mm'/><@handleAlign alignValue=cell.align/><@handleVerticalAlign valignValue=cell.valign/><@handleBorders docBorders=cell.docBorders/><@handleCellSpan cell=cell/>>
9595
<#if (cell.elementList?size > 0)>
9696
<#list cell.elementList as cellElement>
97-
<@handleElement current=cellElement/>
97+
<#if cellElement.class.simpleName = 'DocPhrase'><fo:block><@handleElement current=cellElement/></fo:block><o></o><#else><@handleElement current=cellElement/></#if>
9898
</#list>
9999
<#else>
100100
<fo:block></fo:block>

fj-doc-sample/src/test/java/test/org/fugerit/java/doc/sample/TestSampleDirect.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package test.org.fugerit.java.doc.sample;
22

3-
import org.fugerit.java.core.cfg.ConfigRuntimeException;
43
import org.fugerit.java.core.lang.helpers.ClassHelper;
54
import org.fugerit.java.doc.lib.direct.VenusDirectFacade;
65
import org.fugerit.java.doc.lib.direct.config.VenusDirectConfig;
@@ -18,13 +17,14 @@ class TestSampleDirect {
1817

1918
@Test
2019
void testDirect() throws IOException {
20+
File testOutputMd = new File( "./target/direct-sample/issue-426.md" );
21+
testOutputMd.delete();
2122
try (Reader reader = new InputStreamReader(ClassHelper.loadFromDefaultClassLoader( "venus-config-direct/venus-direct-config.yaml" ) )) {
2223
Map<String, String> envMap = new HashMap<>();
2324
envMap.put( "projectBasedir", "." );
2425
VenusDirectConfig config = VenusDirectFacade.readConfig( reader, envMap );
25-
Assertions.assertThrows( ConfigRuntimeException.class, ()-> VenusDirectFacade.handleAllOutput( config ) );
26+
VenusDirectFacade.handleAllOutput( config );
2627
}
27-
File testOutputMd = new File( "./target/direct-sample/issue-426.md" );
2828
Assertions.assertTrue( testOutputMd.exists() );
2929
}
3030

0 commit comments

Comments
 (0)