Skip to content

Commit

Permalink
chore(confluence) 🐝 manage special characters in the page title (#109)
Browse files Browse the repository at this point in the history
* chore(confluence) 🐝 manage special characters in the page title

* upgrade version manually

---------

Co-authored-by: Julien Boz <[email protected]>
  • Loading branch information
jboz and Julien Boz authored Dec 1, 2023
1 parent c0d2e46 commit 33b997a
Show file tree
Hide file tree
Showing 16 changed files with 20 additions and 19 deletions.
2 changes: 1 addition & 1 deletion livingdoc-examples/aggregate/aggregate-cargo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>ch.ifocusit.livingdoc.example</groupId>
<artifactId>aggregate</artifactId>
<version>2.5-SNAPSHOT</version>
<version>2.6-SNAPSHOT</version>
</parent>

<artifactId>aggregate-cargo</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion livingdoc-examples/aggregate/aggregate-handling/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>ch.ifocusit.livingdoc.example</groupId>
<artifactId>aggregate</artifactId>
<version>2.5-SNAPSHOT</version>
<version>2.6-SNAPSHOT</version>
</parent>

<artifactId>aggregate-handling</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion livingdoc-examples/aggregate/aggregate-location/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>ch.ifocusit.livingdoc.example</groupId>
<artifactId>aggregate</artifactId>
<version>2.5-SNAPSHOT</version>
<version>2.6-SNAPSHOT</version>
</parent>

<artifactId>aggregate-location</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion livingdoc-examples/aggregate/aggregate-shared/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>ch.ifocusit.livingdoc.example</groupId>
<artifactId>aggregate</artifactId>
<version>2.5-SNAPSHOT</version>
<version>2.6-SNAPSHOT</version>
</parent>

<artifactId>aggregate-shared</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>ch.ifocusit.livingdoc.example</groupId>
<artifactId>aggregate</artifactId>
<version>2.5-SNAPSHOT</version>
<version>2.6-SNAPSHOT</version>
</parent>

<artifactId>aggregate-sharedhandling</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion livingdoc-examples/aggregate/aggregate-voyage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>ch.ifocusit.livingdoc.example</groupId>
<artifactId>aggregate</artifactId>
<version>2.5-SNAPSHOT</version>
<version>2.6-SNAPSHOT</version>
</parent>

<artifactId>aggregate-voyage</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>ch.ifocusit.livingdoc.example</groupId>
<artifactId>aggregate</artifactId>
<version>2.5-SNAPSHOT</version>
<version>2.6-SNAPSHOT</version>
</parent>

<artifactId>aggregate-zz-livingdoc</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion livingdoc-examples/aggregate/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>ch.ifocusit.livingdoc.example</groupId>
<artifactId>livingdoc-examples</artifactId>
<version>2.5-SNAPSHOT</version>
<version>2.6-SNAPSHOT</version>
</parent>

<artifactId>aggregate</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion livingdoc-examples/ddd-annotated/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>ch.ifocusit.livingdoc.example</groupId>
<artifactId>livingdoc-examples</artifactId>
<version>2.5-SNAPSHOT</version>
<version>2.6-SNAPSHOT</version>
</parent>

<artifactId>ddd-annotated</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion livingdoc-examples/ddd/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>ch.ifocusit.livingdoc.example</groupId>
<artifactId>livingdoc-examples</artifactId>
<version>2.5-SNAPSHOT</version>
<version>2.6-SNAPSHOT</version>
</parent>

<artifactId>ddd</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# language: en
Feature: A complex feature
Feature: A full feature that doesn't limit
This is the feature description.

In the feature's description, you can use asciidoctor markup as it pleases you.
Expand Down
2 changes: 1 addition & 1 deletion livingdoc-examples/microservice/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>ch.ifocusit.livingdoc.example</groupId>
<artifactId>livingdoc-examples</artifactId>
<version>2.5-SNAPSHOT</version>
<version>2.6-SNAPSHOT</version>
</parent>
<artifactId>microservice</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion livingdoc-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>ch.ifocusit.livingdoc.example</groupId>
<artifactId>livingdoc-examples</artifactId>
<version>2.5-SNAPSHOT</version>
<version>2.6-SNAPSHOT</version>
<packaging>pom</packaging>

<name>Living Documentation example</name>
Expand Down
2 changes: 1 addition & 1 deletion livingdoc-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>ch.ifocusit.livingdoc</groupId>
<artifactId>livingdoc-maven-plugin</artifactId>
<version>2.5-SNAPSHOT</version>
<version>2.6-SNAPSHOT</version>
<packaging>maven-plugin</packaging>

<name>Living Documentation maven plugin</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,14 @@ public String getPageTitle(Path path) {
throw new IllegalStateException("Unable to read page title !", e);
}
try {
String title = "";
if (isAdoc(path)) {
return asciidoctor.load(pageContent, options).getStructuredDoctitle().getMain();
title = asciidoctor.load(pageContent, options).getStructuredDoctitle().getMain();
} else {
// try to read h1 tag
title = tagText(pageContent, "h1");
}
// try to read h1 tag
return tagText(pageContent, "h1");
return StringEscapeUtils.unescapeHtml4(title);
} catch (IllegalStateException e) {
return FilenameUtils.removeExtension(path.getFileName().toString());
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package ch.ifocusit.livingdoc.plugin.publish;

import ch.ifocusit.livingdoc.plugin.baseMojo.AbstractAsciidoctorMojo;
import ch.ifocusit.livingdoc.plugin.publish.confluence.PlantumlMacroBlockProcessor;
import org.asciidoctor.Asciidoctor;
import org.asciidoctor.Attributes;
import org.asciidoctor.Options;
import org.asciidoctor.extension.JavaExtensionRegistry;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.junit.jupiter.MockitoExtension;
Expand Down

0 comments on commit 33b997a

Please sign in to comment.