From d24aa54e75ef633ce1bcdad84c45b0de39a2af81 Mon Sep 17 00:00:00 2001 From: "Brian M. Long" Date: Mon, 10 Feb 2025 14:48:23 -0500 Subject: [PATCH] better delegate @see linking --- README.md | 2 +- src/main/java/com/inteligr8/activiti/doclet/MarkdownWriter.java | 2 +- src/main/resources/templates/bean.md.ftl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 48f5e9d..4bee719 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ This supports many standard tags used in JavaDoc comments. This includes suppor | `@return` | | ✓ | | `@throws` | | ✓ | -If the `@see` tag contains a `#` (e.g. `beanId#method`) then it will hyperlink to the specified bean and method. +If the `@see` tag contains a `#` (e.g. `beanId#method`) then it will hyperlink to the specified bean and method documentation. If you use `beanId#` it will hyperlink to the bean documentation. You can use `beanId#delegate` if you want to hyperlink tot he bean and delegate method documentation. If the `@throws` tag is a `BPMNError`, the next term is expected to be the error code, followed by the standard comment. For example, `@throws BPMNError http-404 Not found`. diff --git a/src/main/java/com/inteligr8/activiti/doclet/MarkdownWriter.java b/src/main/java/com/inteligr8/activiti/doclet/MarkdownWriter.java index 47281c7..602d2be 100644 --- a/src/main/java/com/inteligr8/activiti/doclet/MarkdownWriter.java +++ b/src/main/java/com/inteligr8/activiti/doclet/MarkdownWriter.java @@ -68,7 +68,7 @@ class MarkdownWriter { .with(Pattern.compile("\\{ ?(@[^}]+) \\}"), "{$1}") .with(Pattern.compile("\\{@link ([^}]+)\\}"), "[$1]($1)") .with(Pattern.compile("([A-Za-z0-9\\-\\._]+@[A-Za-z0-9\\-\\._]+)"), "[$1](mailto:$1)"); - private final Pattern seeRefPattern = Pattern.compile("^([A-Za-z0-9_\\-]+)[\\.#]([A-Za-z0-9_]+)$"); + private final Pattern seeRefPattern = Pattern.compile("^([A-Za-z0-9_\\-]+)[\\.#]([A-Za-z0-9_]*)$"); private final DocletEnvironment docenv; private final File outputDirectory; diff --git a/src/main/resources/templates/bean.md.ftl b/src/main/resources/templates/bean.md.ftl index b27f976..feec358 100644 --- a/src/main/resources/templates/bean.md.ftl +++ b/src/main/resources/templates/bean.md.ftl @@ -16,7 +16,7 @@ <#if hasDelegate> -## Delegate Expression Uses +## Delegate Expression Uses This bean may be used as a *Delegate* using the "Delegate Expression" field as shown in the snippet below.