From 3208a83f640680586c31087612406cfbfc12e4df Mon Sep 17 00:00:00 2001 From: rdestefa <360fanelite@gmail.com> Date: Fri, 3 Oct 2025 21:57:52 -0700 Subject: [PATCH 1/7] Allow Detection of WWW Autolinks --- .../ext/autolink/AutolinkExtension.java | 68 ++++++++++++++++++- .../commonmark/ext/autolink/AutolinkType.java | 16 +++++ .../internal/AutolinkPostProcessor.java | 44 ++++++++++-- .../commonmark/ext/autolink/AutolinkTest.java | 18 +++++ 4 files changed, 139 insertions(+), 7 deletions(-) create mode 100644 commonmark-ext-autolink/src/main/java/org/commonmark/ext/autolink/AutolinkType.java diff --git a/commonmark-ext-autolink/src/main/java/org/commonmark/ext/autolink/AutolinkExtension.java b/commonmark-ext-autolink/src/main/java/org/commonmark/ext/autolink/AutolinkExtension.java index e5926c7bb..115676295 100644 --- a/commonmark-ext-autolink/src/main/java/org/commonmark/ext/autolink/AutolinkExtension.java +++ b/commonmark-ext-autolink/src/main/java/org/commonmark/ext/autolink/AutolinkExtension.java @@ -1,5 +1,8 @@ package org.commonmark.ext.autolink; +import java.util.EnumSet; +import java.util.Set; + import org.commonmark.Extension; import org.commonmark.ext.autolink.internal.AutolinkPostProcessor; import org.commonmark.parser.Parser; @@ -18,16 +21,75 @@ */ public class AutolinkExtension implements Parser.ParserExtension { - private AutolinkExtension() { + private final Set linkTypes; + + private AutolinkExtension(Builder builder) { + this.linkTypes = builder.linkTypes; } + /** + * @return the extension with default options + */ public static Extension create() { - return new AutolinkExtension(); + return builder().build(); + } + + /** + * @return a builder to configure the behavior of the extension. + */ + public static Builder builder() { + return new Builder(); } @Override public void extend(Parser.Builder parserBuilder) { - parserBuilder.postProcessor(new AutolinkPostProcessor()); + parserBuilder.postProcessor(new AutolinkPostProcessor(linkTypes)); } + public static class Builder { + + private Set linkTypes = EnumSet.of(AutolinkType.URL, AutolinkType.EMAIL); + + /** + * @param linkTypes the link types that should be converted. By default, {@link AutolinkType#URL} + * and {@link AutolinkType#EMAIL} are converted. + * @return {@code this} + */ + public Builder linkTypes(AutolinkType... linkTypes) { + if (linkTypes == null) { + throw new NullPointerException("linkTypes must not be null"); + } + + if (linkTypes.length == 0) { + throw new IllegalArgumentException("linkTypes must not be empty"); + } + + return this.linkTypes(Set.of(linkTypes)); + } + + /** + * @param linkTypes the link types that should be converted. By default, {@link AutolinkType#URL} + * and {@link AutolinkType#EMAIL} are converted. + * @return {@code this} + */ + public Builder linkTypes(Set linkTypes) { + if (linkTypes == null) { + throw new NullPointerException("linkTypes must not be null"); + } + + if (linkTypes.isEmpty()) { + throw new IllegalArgumentException("linkTypes must not be empty"); + } + + this.linkTypes = EnumSet.copyOf(linkTypes); + return this; + } + + /** + * @return a configured extension + */ + public Extension build() { + return new AutolinkExtension(this); + } + } } diff --git a/commonmark-ext-autolink/src/main/java/org/commonmark/ext/autolink/AutolinkType.java b/commonmark-ext-autolink/src/main/java/org/commonmark/ext/autolink/AutolinkType.java new file mode 100644 index 000000000..3e397a42f --- /dev/null +++ b/commonmark-ext-autolink/src/main/java/org/commonmark/ext/autolink/AutolinkType.java @@ -0,0 +1,16 @@ +package org.commonmark.ext.autolink; + +public enum AutolinkType { + /** + * URL such as {@code http://example.com} + */ + URL, + /** + * Email address such as {@code foo@example.com} + */ + EMAIL, + /** + * URL such as {@code www.example.com} + */ + WWW +} diff --git a/commonmark-ext-autolink/src/main/java/org/commonmark/ext/autolink/internal/AutolinkPostProcessor.java b/commonmark-ext-autolink/src/main/java/org/commonmark/ext/autolink/internal/AutolinkPostProcessor.java index ee8847911..33f70bf21 100644 --- a/commonmark-ext-autolink/src/main/java/org/commonmark/ext/autolink/internal/AutolinkPostProcessor.java +++ b/commonmark-ext-autolink/src/main/java/org/commonmark/ext/autolink/internal/AutolinkPostProcessor.java @@ -1,5 +1,6 @@ package org.commonmark.ext.autolink.internal; +import org.commonmark.ext.autolink.AutolinkType; import org.commonmark.node.*; import org.commonmark.parser.PostProcessor; import org.nibor.autolink.LinkExtractor; @@ -11,9 +12,40 @@ public class AutolinkPostProcessor implements PostProcessor { - private LinkExtractor linkExtractor = LinkExtractor.builder() - .linkTypes(EnumSet.of(LinkType.URL, LinkType.EMAIL)) - .build(); + private final LinkExtractor linkExtractor; + + public AutolinkPostProcessor() { + this(EnumSet.of(AutolinkType.URL, AutolinkType.EMAIL)); + } + + public AutolinkPostProcessor(Set linkTypes) { + if (linkTypes == null) { + throw new NullPointerException("linkTypes must not be null"); + } + + if (linkTypes.isEmpty()) { + throw new IllegalArgumentException("linkTypes must not be empty"); + } + + EnumSet types = EnumSet.noneOf(LinkType.class); + for (AutolinkType linkType : linkTypes) { + switch (linkType) { + case URL: + types.add(LinkType.URL); + break; + case EMAIL: + types.add(LinkType.EMAIL); + break; + case WWW: + types.add(LinkType.WWW); + break; + } + } + + this.linkExtractor = LinkExtractor.builder() + .linkTypes(types) + .build(); + } @Override public Node process(Node node) { @@ -67,8 +99,12 @@ private static Text createTextNode(String literal, Span span, SourceSpan sourceS } private static String getDestination(LinkSpan linkSpan, String linkText) { - if (linkSpan.getType() == LinkType.EMAIL) { + LinkType type = linkSpan.getType(); + + if (type == LinkType.EMAIL) { return "mailto:" + linkText; + } else if (type == LinkType.WWW) { + return "http://" + linkText; } else { return linkText; } diff --git a/commonmark-ext-autolink/src/test/java/org/commonmark/ext/autolink/AutolinkTest.java b/commonmark-ext-autolink/src/test/java/org/commonmark/ext/autolink/AutolinkTest.java index 338513f33..81d898a31 100644 --- a/commonmark-ext-autolink/src/test/java/org/commonmark/ext/autolink/AutolinkTest.java +++ b/commonmark-ext-autolink/src/test/java/org/commonmark/ext/autolink/AutolinkTest.java @@ -19,6 +19,12 @@ public class AutolinkTest extends RenderingTestCase { private static final Parser PARSER = Parser.builder().extensions(EXTENSIONS).build(); private static final HtmlRenderer RENDERER = HtmlRenderer.builder().extensions(EXTENSIONS).build(); + private static final Set WWW_EXTENSIONS = Set.of(AutolinkExtension.builder() + .linkTypes(AutolinkType.URL, AutolinkType.EMAIL, AutolinkType.WWW) + .build()); + private static final Parser WWW_PARSER = Parser.builder().extensions(WWW_EXTENSIONS).build(); + private static final HtmlRenderer WWW_RENDERER = HtmlRenderer.builder().extensions(WWW_EXTENSIONS).build(); + @Test public void oneTextNode() { assertRendering("foo http://one.org/ bar http://two.org/", @@ -57,6 +63,18 @@ public void dontLinkTextWithinLinks() { "

http://example.com

\n"); } + @Test + public void wwwLinksDontWorkByDefault() { + assertRendering("www.example.com", + "

www.example.com

\n"); + } + + @Test + public void wwwLinks() { + String html = WWW_RENDERER.render(WWW_PARSER.parse("www.example.com")); + assertThat(html).isEqualTo("

www.example.com

\n"); + } + @Test public void sourceSpans() { Parser parser = Parser.builder() From 675d2c45805a1089ea3f1bd78f0d3864fecfb78f Mon Sep 17 00:00:00 2001 From: Ryan DeStefano <67760716+rdestefa@users.noreply.github.com> Date: Mon, 6 Oct 2025 01:55:58 -0700 Subject: [PATCH 2/7] Address PR Comments --- .../org/commonmark/ext/autolink/AutolinkExtension.java | 4 ---- .../java/org/commonmark/ext/autolink/AutolinkType.java | 3 +++ .../ext/autolink/internal/AutolinkPostProcessor.java | 10 +++------- .../java/org/commonmark/ext/autolink/AutolinkTest.java | 2 +- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/commonmark-ext-autolink/src/main/java/org/commonmark/ext/autolink/AutolinkExtension.java b/commonmark-ext-autolink/src/main/java/org/commonmark/ext/autolink/AutolinkExtension.java index 115676295..99c4f6d40 100644 --- a/commonmark-ext-autolink/src/main/java/org/commonmark/ext/autolink/AutolinkExtension.java +++ b/commonmark-ext-autolink/src/main/java/org/commonmark/ext/autolink/AutolinkExtension.java @@ -60,10 +60,6 @@ public Builder linkTypes(AutolinkType... linkTypes) { throw new NullPointerException("linkTypes must not be null"); } - if (linkTypes.length == 0) { - throw new IllegalArgumentException("linkTypes must not be empty"); - } - return this.linkTypes(Set.of(linkTypes)); } diff --git a/commonmark-ext-autolink/src/main/java/org/commonmark/ext/autolink/AutolinkType.java b/commonmark-ext-autolink/src/main/java/org/commonmark/ext/autolink/AutolinkType.java index 3e397a42f..2c8c6574f 100644 --- a/commonmark-ext-autolink/src/main/java/org/commonmark/ext/autolink/AutolinkType.java +++ b/commonmark-ext-autolink/src/main/java/org/commonmark/ext/autolink/AutolinkType.java @@ -1,5 +1,8 @@ package org.commonmark.ext.autolink; +/** + * The types of strings that can be automatically turned into links. + */ public enum AutolinkType { /** * URL such as {@code http://example.com} diff --git a/commonmark-ext-autolink/src/main/java/org/commonmark/ext/autolink/internal/AutolinkPostProcessor.java b/commonmark-ext-autolink/src/main/java/org/commonmark/ext/autolink/internal/AutolinkPostProcessor.java index 33f70bf21..4ce070fd8 100644 --- a/commonmark-ext-autolink/src/main/java/org/commonmark/ext/autolink/internal/AutolinkPostProcessor.java +++ b/commonmark-ext-autolink/src/main/java/org/commonmark/ext/autolink/internal/AutolinkPostProcessor.java @@ -14,10 +14,6 @@ public class AutolinkPostProcessor implements PostProcessor { private final LinkExtractor linkExtractor; - public AutolinkPostProcessor() { - this(EnumSet.of(AutolinkType.URL, AutolinkType.EMAIL)); - } - public AutolinkPostProcessor(Set linkTypes) { if (linkTypes == null) { throw new NullPointerException("linkTypes must not be null"); @@ -27,7 +23,7 @@ public AutolinkPostProcessor(Set linkTypes) { throw new IllegalArgumentException("linkTypes must not be empty"); } - EnumSet types = EnumSet.noneOf(LinkType.class); + var types = EnumSet.noneOf(LinkType.class); for (AutolinkType linkType : linkTypes) { switch (linkType) { case URL: @@ -99,12 +95,12 @@ private static Text createTextNode(String literal, Span span, SourceSpan sourceS } private static String getDestination(LinkSpan linkSpan, String linkText) { - LinkType type = linkSpan.getType(); + var type = linkSpan.getType(); if (type == LinkType.EMAIL) { return "mailto:" + linkText; } else if (type == LinkType.WWW) { - return "http://" + linkText; + return "https://" + linkText; } else { return linkText; } diff --git a/commonmark-ext-autolink/src/test/java/org/commonmark/ext/autolink/AutolinkTest.java b/commonmark-ext-autolink/src/test/java/org/commonmark/ext/autolink/AutolinkTest.java index 81d898a31..ada6c1580 100644 --- a/commonmark-ext-autolink/src/test/java/org/commonmark/ext/autolink/AutolinkTest.java +++ b/commonmark-ext-autolink/src/test/java/org/commonmark/ext/autolink/AutolinkTest.java @@ -72,7 +72,7 @@ public void wwwLinksDontWorkByDefault() { @Test public void wwwLinks() { String html = WWW_RENDERER.render(WWW_PARSER.parse("www.example.com")); - assertThat(html).isEqualTo("

www.example.com

\n"); + assertThat(html).isEqualTo("

www.example.com

\n"); } @Test From 4186529fe603de45fd68003aef0f78354f09879a Mon Sep 17 00:00:00 2001 From: Ryan DeStefano <67760716+rdestefa@users.noreply.github.com> Date: Mon, 6 Oct 2025 02:13:32 -0700 Subject: [PATCH 3/7] Add Changelog Entry --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c184b9ba6..5de44520a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,15 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html), with the exception that 0.x versions can break between minor versions. +## Unreleased +### Added +- Autolink extension: Now supports configuration of different link types that + should be recognized and converted to links. See `AutolinkExtension#builder` + | Type | Default? | Description | + | `URL` | Yes | URL with a protocol such as `https://example.com` | + | `EMAIL` | Yes | Email address such as `foo@example.com` | + | `WWW` | No | An address beginning with `www` such as `www.example.com` | + ## [0.26.0] - 2025-09-13 ### Changed - A `LinkProcessor` using `replaceWith` now also stops outer links from being From 64f76d9727682af819c9492a636040e8fcb6a4aa Mon Sep 17 00:00:00 2001 From: Ryan DeStefano <67760716+rdestefa@users.noreply.github.com> Date: Mon, 6 Oct 2025 02:15:12 -0700 Subject: [PATCH 4/7] Fix Changelog Typo --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5de44520a..bed5058b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ with the exception that 0.x versions can break between minor versions. - Autolink extension: Now supports configuration of different link types that should be recognized and converted to links. See `AutolinkExtension#builder` | Type | Default? | Description | + |---------|----------|-----------------------------------------------------------| | `URL` | Yes | URL with a protocol such as `https://example.com` | | `EMAIL` | Yes | Email address such as `foo@example.com` | | `WWW` | No | An address beginning with `www` such as `www.example.com` | From e49094cf8e0912b79737e6fed66a8e245b8285e0 Mon Sep 17 00:00:00 2001 From: Ryan DeStefano <67760716+rdestefa@users.noreply.github.com> Date: Mon, 6 Oct 2025 22:10:13 -0700 Subject: [PATCH 5/7] Address PR Comments 2 --- CHANGELOG.md | 20 ++++++++++++++----- .../ext/autolink/AutolinkExtension.java | 10 +++++----- .../internal/AutolinkPostProcessor.java | 3 ++- .../commonmark/ext/autolink/AutolinkTest.java | 18 ++++++++--------- 4 files changed, 31 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bed5058b3..74989fe2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,11 +10,21 @@ with the exception that 0.x versions can break between minor versions. ### Added - Autolink extension: Now supports configuration of different link types that should be recognized and converted to links. See `AutolinkExtension#builder` - | Type | Default? | Description | - |---------|----------|-----------------------------------------------------------| - | `URL` | Yes | URL with a protocol such as `https://example.com` | - | `EMAIL` | Yes | Email address such as `foo@example.com` | - | `WWW` | No | An address beginning with `www` such as `www.example.com` | + + | Type | Default? | Description | + |---------|----------|--------------------------------------------------------| + | `URL` | Yes | URL with a protocol such as `https://example.com` | + | `EMAIL` | Yes | Email address such as `foo@example.com` | + | `WWW` | Yes | Address beginning with `www` such as `www.example.com` | + + > [!NOTE] + > + > This changes the behavior of `AutolinkExtension.create()` to now also include + > `WWW` links by default. To re-enable the previous behavior, use: + > + > ```java + > AutolinkExtension.builder().linkTypes(AutolinkType.URL, AutolinkType.EMAIL).build(); + > ``` ## [0.26.0] - 2025-09-13 ### Changed diff --git a/commonmark-ext-autolink/src/main/java/org/commonmark/ext/autolink/AutolinkExtension.java b/commonmark-ext-autolink/src/main/java/org/commonmark/ext/autolink/AutolinkExtension.java index 99c4f6d40..7d5a74f30 100644 --- a/commonmark-ext-autolink/src/main/java/org/commonmark/ext/autolink/AutolinkExtension.java +++ b/commonmark-ext-autolink/src/main/java/org/commonmark/ext/autolink/AutolinkExtension.java @@ -48,11 +48,11 @@ public void extend(Parser.Builder parserBuilder) { public static class Builder { - private Set linkTypes = EnumSet.of(AutolinkType.URL, AutolinkType.EMAIL); + private Set linkTypes = EnumSet.allOf(AutolinkType.class); /** - * @param linkTypes the link types that should be converted. By default, {@link AutolinkType#URL} - * and {@link AutolinkType#EMAIL} are converted. + * @param linkTypes the link types that should be converted. By default, + * all {@link AutolinkType}s are converted. * @return {@code this} */ public Builder linkTypes(AutolinkType... linkTypes) { @@ -64,8 +64,8 @@ public Builder linkTypes(AutolinkType... linkTypes) { } /** - * @param linkTypes the link types that should be converted. By default, {@link AutolinkType#URL} - * and {@link AutolinkType#EMAIL} are converted. + * @param linkTypes the link types that should be converted. By default, + * all {@link AutolinkType}s are converted. * @return {@code this} */ public Builder linkTypes(Set linkTypes) { diff --git a/commonmark-ext-autolink/src/main/java/org/commonmark/ext/autolink/internal/AutolinkPostProcessor.java b/commonmark-ext-autolink/src/main/java/org/commonmark/ext/autolink/internal/AutolinkPostProcessor.java index 4ce070fd8..a381c2f19 100644 --- a/commonmark-ext-autolink/src/main/java/org/commonmark/ext/autolink/internal/AutolinkPostProcessor.java +++ b/commonmark-ext-autolink/src/main/java/org/commonmark/ext/autolink/internal/AutolinkPostProcessor.java @@ -100,7 +100,8 @@ private static String getDestination(LinkSpan linkSpan, String linkText) { if (type == LinkType.EMAIL) { return "mailto:" + linkText; } else if (type == LinkType.WWW) { - return "https://" + linkText; + // Use http instead of https (see https://github.github.com/gfm/#extended-www-autolink) + return "http://" + linkText; } else { return linkText; } diff --git a/commonmark-ext-autolink/src/test/java/org/commonmark/ext/autolink/AutolinkTest.java b/commonmark-ext-autolink/src/test/java/org/commonmark/ext/autolink/AutolinkTest.java index ada6c1580..1b93cb10c 100644 --- a/commonmark-ext-autolink/src/test/java/org/commonmark/ext/autolink/AutolinkTest.java +++ b/commonmark-ext-autolink/src/test/java/org/commonmark/ext/autolink/AutolinkTest.java @@ -19,11 +19,11 @@ public class AutolinkTest extends RenderingTestCase { private static final Parser PARSER = Parser.builder().extensions(EXTENSIONS).build(); private static final HtmlRenderer RENDERER = HtmlRenderer.builder().extensions(EXTENSIONS).build(); - private static final Set WWW_EXTENSIONS = Set.of(AutolinkExtension.builder() - .linkTypes(AutolinkType.URL, AutolinkType.EMAIL, AutolinkType.WWW) + private static final Set NO_WWW_EXTENSIONS = Set.of(AutolinkExtension.builder() + .linkTypes(AutolinkType.URL, AutolinkType.EMAIL) .build()); - private static final Parser WWW_PARSER = Parser.builder().extensions(WWW_EXTENSIONS).build(); - private static final HtmlRenderer WWW_RENDERER = HtmlRenderer.builder().extensions(WWW_EXTENSIONS).build(); + private static final Parser NO_WWW_PARSER = Parser.builder().extensions(NO_WWW_EXTENSIONS).build(); + private static final HtmlRenderer NO_WWW_RENDERER = HtmlRenderer.builder().extensions(NO_WWW_EXTENSIONS).build(); @Test public void oneTextNode() { @@ -64,15 +64,15 @@ public void dontLinkTextWithinLinks() { } @Test - public void wwwLinksDontWorkByDefault() { + public void wwwLinks() { assertRendering("www.example.com", - "

www.example.com

\n"); + "

www.example.com

\n"); } @Test - public void wwwLinks() { - String html = WWW_RENDERER.render(WWW_PARSER.parse("www.example.com")); - assertThat(html).isEqualTo("

www.example.com

\n"); + public void noWwwLinks() { + String html = NO_WWW_RENDERER.render(NO_WWW_PARSER.parse("www.example.com")); + assertThat(html).isEqualTo("

www.example.com

\n"); } @Test From 53bf47d5cf6e7854dee03af658b1f7960c585dcf Mon Sep 17 00:00:00 2001 From: Ryan DeStefano <67760716+rdestefa@users.noreply.github.com> Date: Mon, 6 Oct 2025 22:17:58 -0700 Subject: [PATCH 6/7] Fix Test Failure --- CHANGELOG.md | 14 ++++++-------- .../org/commonmark/ext/autolink/AutolinkTest.java | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 74989fe2b..40945d940 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,15 +16,13 @@ with the exception that 0.x versions can break between minor versions. | `URL` | Yes | URL with a protocol such as `https://example.com` | | `EMAIL` | Yes | Email address such as `foo@example.com` | | `WWW` | Yes | Address beginning with `www` such as `www.example.com` | + + Note that This changes the behavior of `AutolinkExtension.create()` to now also + include `WWW` links by default. To re-enable the previous behavior, use: - > [!NOTE] - > - > This changes the behavior of `AutolinkExtension.create()` to now also include - > `WWW` links by default. To re-enable the previous behavior, use: - > - > ```java - > AutolinkExtension.builder().linkTypes(AutolinkType.URL, AutolinkType.EMAIL).build(); - > ``` + ```java + AutolinkExtension.builder().linkTypes(AutolinkType.URL, AutolinkType.EMAIL).build(); + ``` ## [0.26.0] - 2025-09-13 ### Changed diff --git a/commonmark-ext-autolink/src/test/java/org/commonmark/ext/autolink/AutolinkTest.java b/commonmark-ext-autolink/src/test/java/org/commonmark/ext/autolink/AutolinkTest.java index 1b93cb10c..82c3899fc 100644 --- a/commonmark-ext-autolink/src/test/java/org/commonmark/ext/autolink/AutolinkTest.java +++ b/commonmark-ext-autolink/src/test/java/org/commonmark/ext/autolink/AutolinkTest.java @@ -66,7 +66,7 @@ public void dontLinkTextWithinLinks() { @Test public void wwwLinks() { assertRendering("www.example.com", - "

www.example.com

\n"); + "

www.example.com

\n"); } @Test From 889709c57578369685f4ece88917c1ffa8df44c2 Mon Sep 17 00:00:00 2001 From: Ryan DeStefano <67760716+rdestefa@users.noreply.github.com> Date: Mon, 6 Oct 2025 22:20:40 -0700 Subject: [PATCH 7/7] Typo --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 40945d940..9cb1bae6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,7 @@ with the exception that 0.x versions can break between minor versions. | `EMAIL` | Yes | Email address such as `foo@example.com` | | `WWW` | Yes | Address beginning with `www` such as `www.example.com` | - Note that This changes the behavior of `AutolinkExtension.create()` to now also + Note that this changes the behavior of `AutolinkExtension.create()` to now also include `WWW` links by default. To re-enable the previous behavior, use: ```java