Repository: jhy/jsoup
Pull request #2128 (2024-03-11 23:02:59)

Bump com.github.siom79.japicmp:japicmp-maven-plugin from 0.18.3 to 0.20.0
Bumps [com.github.siom79.japicmp:japicmp-maven-plugin](https://github.com/siom79/japicmp) from 0.18.3 to 0.20.0.
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/siom79/japicmp/commit/6273268b11d172c6f5b935329423d8804d7c752f"><code>6273268</code></a> [maven-release-plugin] prepare release japicmp-base-0.20.0</li>
<li><a href="https://github.com/siom79/japicmp/commit/eb94f4b815af82e566fb707a7d31242dc7da4407"><code>eb94f4b</code></a> upgraded version in *.md files to 0.20.0</li>
<li><a href="https://github.com/siom79/japicmp/commit/b8bb82e2491512d05300e2d762b09e37d1b03dbe"><code>b8bb82e</code></a> ReleaseNotes.md</li>
<li><a href="https://github.com/siom79/japicmp/commit/d0d5c710287ee53e7e03d4538b4fe3ec95dd9f52"><code>d0d5c71</code></a> Merge pull request <a href="https://redirect.github.com/siom79/japicmp/issues/389">#389</a> from siom79/html-without-xml</li>
<li><a href="https://github.com/siom79/japicmp/commit/b0296f3d23cd5b190c60a2f24aaefab19b773e60"><code>b0296f3</code></a> StringBuilder instead of StringBuffer</li>
<li><a href="https://github.com/siom79/japicmp/commit/f5119707239c3824658933b2992fb4f34c03b4a6"><code>f511970</code></a> removed html.xslt</li>
<li><a href="https://github.com/siom79/japicmp/commit/230e5723b00cda2f8c0236f76ec7ce972189e4af"><code>230e572</code></a> JApiCmpMojo uses HtmlOutputGenerator</li>
<li><a href="https://github.com/siom79/japicmp/commit/975fd4c3e3f1ef4e528582444574d81cabb0ae0d"><code>975fd4c</code></a> fixed further tests</li>
<li><a href="https://github.com/siom79/japicmp/commit/37e7bed03da58c7b1ba119e83996a2f28ffe2b50"><code>37e7bed</code></a> fixed XmlOutputGeneratorTest</li>
<li><a href="https://github.com/siom79/japicmp/commit/d6c22ee407b44197b9c69c4fa4c055184b03fe99"><code>d6c22ee</code></a> finished HtmlOutputGenerator</li>
<li>Additional commits viewable in <a href="https://github.com/siom79/japicmp/compare/japicmp-base-0.18.3...japicmp-base-0.20.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.github.siom79.japicmp:japicmp-maven-plugin&package-manager=maven&previous-version=0.18.3&new-version=0.20.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

You can trigger a rebase of this PR by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

> **Note**
> Automatic rebases have been disabled on this pull request as it has been open for over 30 days.



Patch:
diff --git a/CHANGES.md b/CHANGES.md
index 8f0d8a49..0f268d24 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -6,6 +6,8 @@
 
 * Added `Path` accepting parse methods: `Jsoup.parse(Path)`, `Jsoup.parse(path, charsetName, baseUri, parser)`,
   etc. [2055](https://github.com/jhy/jsoup/pull/2055)
+* Updated the `button` tag configuration to include a space between multiple button elements in the `Element.text()` 
+  method. 
 
 ### Changes
 
diff --git a/pom.xml b/pom.xml
index e25abaec..daa777a3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -228,7 +228,7 @@
         <!-- API version compat check - https://siom79.github.io/japicmp/ -->
         <groupId>com.github.siom79.japicmp</groupId>
         <artifactId>japicmp-maven-plugin</artifactId>
-        <version>0.18.3</version>
+        <version>0.20.0</version>
         <configuration>
           <!-- hard code previous version; can't detect when running stateless on build server -->
           <oldVersion>
@@ -404,7 +404,7 @@
     <dependency>
       <groupId>org.junit.jupiter</groupId>
       <artifactId>junit-jupiter</artifactId>
-      <version>5.10.1</version>
+      <version>5.10.3</version>
       <scope>test</scope>
     </dependency>
 
diff --git a/src/main/java/org/jsoup/parser/Tag.java b/src/main/java/org/jsoup/parser/Tag.java
index abac6e8f..26f0aac0 100644
--- a/src/main/java/org/jsoup/parser/Tag.java
+++ b/src/main/java/org/jsoup/parser/Tag.java
@@ -271,7 +271,7 @@ public class Tag implements Cloneable {
     private static final String[] inlineTags = {
             "object", "base", "font", "tt", "i", "b", "u", "big", "small", "em", "strong", "dfn", "code", "samp", "kbd",
             "var", "cite", "abbr", "time", "acronym", "mark", "ruby", "rt", "rp", "rtc", "a", "img", "br", "wbr", "map", "q",
-            "sub", "sup", "bdo", "iframe", "embed", "span", "input", "select", "textarea", "label", "button", "optgroup",
+            "sub", "sup", "bdo", "iframe", "embed", "span", "input", "select", "textarea", "label", "optgroup",
             "option", "legend", "datalist", "keygen", "output", "progress", "meter", "area", "param", "source", "track",
             "summary", "command", "device", "area", "basefont", "bgsound", "menuitem", "param", "source", "track",
             "data", "bdi", "s", "strike", "nobr",
@@ -286,7 +286,7 @@ public class Tag implements Cloneable {
     // todo - rework this to format contents as inline; and update html emitter in Element. Same output, just neater.
     private static final String[] formatAsInlineTags = {
             "title", "a", "p", "h1", "h2", "h3", "h4", "h5", "h6", "pre", "address", "li", "th", "td", "script", "style",
-            "ins", "del", "s"
+            "ins", "del", "s", "button"
     };
     private static final String[] preserveWhitespaceTags = {
             "pre", "plaintext", "title", "textarea"


Test patch:
diff --git a/src/test/java/org/jsoup/nodes/ElementTest.java b/src/test/java/org/jsoup/nodes/ElementTest.java
index 71a43b78..f0e1f462 100644
--- a/src/test/java/org/jsoup/nodes/ElementTest.java
+++ b/src/test/java/org/jsoup/nodes/ElementTest.java
@@ -220,6 +220,16 @@ public class ElementTest {
         assertEquals(".  ", p3.wholeText());
     }
 
+    @Test void buttonTextHasSpace() {
+        // https://github.com/jhy/jsoup/issues/2105
+        Document doc = Jsoup.parse("<html><button>Reply</button><button>All</button></html>");
+        String text = doc.body().text();
+        String wholetext = doc.body().wholeText();
+
+        assertEquals("Reply All", text);
+        assertEquals("ReplyAll", wholetext);
+    }
+
     @Test
     public void testGetSiblings() {
         Document doc = Jsoup.parse("<div><p>Hello<p id=1>there<p>this<p>is<p>an<p id=last>element</div>");