Skip to content

Commit 51909b1

Browse files
committed
Tweak HTML javadoc >
1 parent 91b5a56 commit 51909b1

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/main/java/org/jsoup/Connection.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ <li>returns the appropriate credentials (username and password)</li>
376376
<code><pre>
377377
Connection session = Jsoup.newSession()
378378
.proxy("proxy.example.com", 8080)
379-
.auth(auth -> {
379+
.auth(auth -&gt; {
380380
if (auth.isServer()) { // provide credentials for the request url
381381
Validate.isTrue(auth.url().getHost().equals("example.com"));
382382
// check that we're sending credentials were we expect, and not redirected out

src/main/java/org/jsoup/select/NodeVisitor.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
<pre><code>
1717
doc.body().traverse((node, depth) -> {
1818
switch (node) {
19-
case Element el -> print(el.tag() + ": " + el.ownText());
20-
case DataNode data -> print("Data: " + data.getWholeData());
21-
default -> print(node.nodeName() + " at depth " + depth);
19+
case Element el -&gt; print(el.tag() + ": " + el.ownText());
20+
case DataNode data -&gt; print("Data: " + data.getWholeData());
21+
default -&gt; print(node.nodeName() + " at depth " + depth);
2222
}
2323
});
2424
</code></pre>

src/main/java/org/jsoup/select/Selector.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
* <tr><td><code>:gt(<em>n</em>)</code></td><td>elements whose sibling index is greater than <em>n</em></td><td><code>td:gt(1)</code> finds cells after skipping the first two</td></tr>
5151
* <tr><td><code>:eq(<em>n</em>)</code></td><td>elements whose sibling index is equal to <em>n</em></td><td><code>td:eq(0)</code> finds the first cell of each row</td></tr>
5252
* <tr><td><code>:has(<em>selector</em>)</code></td><td>elements that contains at least one element matching the <em>selector</em></td><td><code>div:has(p)</code> finds <code>div</code>s that contain <code>p</code> elements.<br><code>div:has(&gt; a)</code> selects <code>div</code> elements that have at least one direct child <code>a</code> element.<br><code>section:has(h1, h2)</code> finds <code>section</code> elements that contain a <code>h1</code> or a <code>h2</code> element</td></tr>
53-
* <tr><td><code>:is(<em>selector list</em>)</code></td><td>elements that match any of the selectors in the selector list</td><td><code>:is(h1, h2, h3, h4, h5, h6)</code> finds any heading element.<br><code>:is(section, article) > :is(h1, h2)</code> finds a <code>h1</code> or <code>h2</code> that is a direct child of a <code>section</code> or an <code>article</code></td></tr>
53+
* <tr><td><code>:is(<em>selector list</em>)</code></td><td>elements that match any of the selectors in the selector list</td><td><code>:is(h1, h2, h3, h4, h5, h6)</code> finds any heading element.<br><code>:is(section, article) &gt; :is(h1, h2)</code> finds a <code>h1</code> or <code>h2</code> that is a direct child of a <code>section</code> or an <code>article</code></td></tr>
5454
* <tr><td><code>:not(<em>selector</em>)</code></td><td>elements that do not match the <em>selector</em>. See also {@link Elements#not(String)}</td><td><code>div:not(.logo)</code> finds all divs that do not have the "logo" class.<p><code>div:not(:has(div))</code> finds divs that do not contain divs.</p></td></tr>
5555
* <tr><td><code>:contains(<em>text</em>)</code></td><td>elements that contains the specified text. The search is case insensitive. The text may appear in the found element, or any of its descendants. The text is whitespace normalized. <p>To find content that includes parentheses, escape those with a {@code \}.</p></td><td><code>p:contains(jsoup)</code> finds p elements containing the text "jsoup".<p>{@code p:contains(hello \(there\) finds p elements containing the text "Hello (There)"}</p></td></tr>
5656
* <tr><td><code>:containsOwn(<em>text</em>)</code></td><td>elements that directly contain the specified text. The search is case insensitive. The text must appear in the found element, not any of its descendants.</td><td><code>p:containsOwn(jsoup)</code> finds p elements with own text "jsoup".</td></tr>

0 commit comments

Comments
 (0)