Skip to content
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
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ and the project follows [Semantic Versioning](https://semver.org/).
## [Unreleased]

### Build
- **GraphCompose engine bumped 1.9.1 → 2.0.0.** The 2.0 release splits the monolithic engine
into per-concern modules, but `io.github.demchaav:graph-compose` stays the drop-in default —
it is now a thin aggregator over `graph-compose-core` + `graph-compose-render-pdf`, so this
library keeps rendering PDF with **no dependency change and no change to `MarkdownComposer`
or any public type**. The optional `graph-compose-fonts` / `graph-compose-emoji` add-ons keep
their own version lines and are unchanged. The only source touched was a test: 2.0 removed the
deprecated `linkOptions()` read-accessor on the engine's inline runs, so `InlineRendererTest`
now reads the surrounding link through `linkTarget()` / `ExternalLinkTarget.options().uri()`
(the value it asserts is unchanged). 188 library tests + the CLI suite pass on 2.0.0.
- **GraphCompose engine bumped 1.9.0 → 1.9.1.** Long inline-code tokens with no spaces
(package coordinates, fully-qualified class names, URLs) now break *within* their table
cell or paragraph — at `.` `:` `/` `-` seams, char-splitting only as a last resort — instead
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ import java.nio.file.Path;
String md = """
# Release notes

GraphCompose **1.9** ships *themeable* Markdown rendering.
GraphCompose **2.0** ships *themeable* Markdown rendering.

- Headings, lists and `inline code`
- Syntax-highlighted code blocks
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<maven.compiler.release>17</maven.compiler.release>

<!-- Runtime / library dependencies -->
<graphcompose.version>1.9.1</graphcompose.version>
<graphcompose.version>2.0.0</graphcompose.version>
<graphcompose.fonts.version>1.0.0</graphcompose.fonts.version>
<graphcompose.emoji.version>1.0.0</graphcompose.emoji.version>
<flexmark.version>0.64.8</flexmark.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.demcha.compose.document.node.InlineRun;
import com.demcha.compose.document.node.InlineShapeRun;
import com.demcha.compose.document.node.InlineTextRun;
import com.demcha.compose.document.node.ExternalLinkTarget;
import com.demcha.compose.document.node.InternalLinkTarget;
import io.github.demchaav.markdown.extension.ImageResolver;
import io.github.demchaav.markdown.model.inline.CodeRun;
Expand Down Expand Up @@ -85,7 +86,10 @@ void inlineImageInsideALinkCarriesTheLinkAnnotation() {

InlineImageRun image = (InlineImageRun) rich.runs().stream()
.filter(InlineImageRun.class::isInstance).findFirst().orElseThrow();
assertThat(image.linkOptions()).isNotNull(); // the surrounding link is threaded onto the image
// the surrounding link is threaded onto the image as an external-URI target
assertThat(image.linkTarget()).isInstanceOf(ExternalLinkTarget.class);
assertThat(((ExternalLinkTarget) image.linkTarget()).options().uri())
.isEqualTo("https://example.com");
}

@Test
Expand Down Expand Up @@ -162,7 +166,11 @@ void externalLinkStillCarriesAUriTarget() {
List.of(new LinkRun("https://example.com", null, List.of(new TextRun("site")))), BASE);

InlineTextRun run = (InlineTextRun) rich.runs().get(0);
assertThat(run.linkOptions()).as("external link keeps its URI options").isNotNull();
assertThat(run.linkTarget())
.as("external link keeps its URI target")
.isInstanceOf(ExternalLinkTarget.class);
assertThat(((ExternalLinkTarget) run.linkTarget()).options().uri())
.isEqualTo("https://example.com");
}

private static byte[] png(int width, int height) {
Expand Down