Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(confluence) 🐝 manage special characters in the page title #109

Merged
merged 2 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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