diff --git a/src/main/java/org/jsoup/Connection.java b/src/main/java/org/jsoup/Connection.java index 8ced43f0ee..86d79e7864 100644 --- a/src/main/java/org/jsoup/Connection.java +++ b/src/main/java/org/jsoup/Connection.java @@ -376,7 +376,7 @@
Connection session = Jsoup.newSession()
.proxy("proxy.example.com", 8080)
- .auth(auth -> {
+ .auth(auth -> {
if (auth.isServer()) { // provide credentials for the request url
Validate.isTrue(auth.url().getHost().equals("example.com"));
// check that we're sending credentials were we expect, and not redirected out
diff --git a/src/main/java/org/jsoup/select/NodeVisitor.java b/src/main/java/org/jsoup/select/NodeVisitor.java
index 6fa0fa7e13..decf9e2a85 100644
--- a/src/main/java/org/jsoup/select/NodeVisitor.java
+++ b/src/main/java/org/jsoup/select/NodeVisitor.java
@@ -16,9 +16,9 @@
doc.body().traverse((node, depth) -> {
switch (node) {
- case Element el -> print(el.tag() + ": " + el.ownText());
- case DataNode data -> print("Data: " + data.getWholeData());
- default -> print(node.nodeName() + " at depth " + depth);
+ case Element el -> print(el.tag() + ": " + el.ownText());
+ case DataNode data -> print("Data: " + data.getWholeData());
+ default -> print(node.nodeName() + " at depth " + depth);
}
});
diff --git a/src/main/java/org/jsoup/select/Selector.java b/src/main/java/org/jsoup/select/Selector.java
index 68e37d08d4..e1d09f5b51 100644
--- a/src/main/java/org/jsoup/select/Selector.java
+++ b/src/main/java/org/jsoup/select/Selector.java
@@ -50,7 +50,7 @@
* :gt(n)
elements whose sibling index is greater than n td:gt(1)
finds cells after skipping the first two
* :eq(n)
elements whose sibling index is equal to n td:eq(0)
finds the first cell of each row
* :has(selector)
elements that contains at least one element matching the selector div:has(p)
finds div
s that contain p
elements.
div:has(> a)
selects div
elements that have at least one direct child a
element.
section:has(h1, h2)
finds section
elements that contain a h1
or a h2
element
- * :is(selector list)
elements that match any of the selectors in the selector list :is(h1, h2, h3, h4, h5, h6)
finds any heading element.
:is(section, article) > :is(h1, h2)
finds a h1
or h2
that is a direct child of a section
or an article
+ * :is(selector list)
elements that match any of the selectors in the selector list :is(h1, h2, h3, h4, h5, h6)
finds any heading element.
:is(section, article) > :is(h1, h2)
finds a h1
or h2
that is a direct child of a section
or an article
* :not(selector)
elements that do not match the selector. See also {@link Elements#not(String)} div:not(.logo)
finds all divs that do not have the "logo" class.div:not(:has(div))
finds divs that do not contain divs.
* :contains(text)
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. To find content that includes parentheses, escape those with a {@code \}.
p:contains(jsoup)
finds p elements containing the text "jsoup".{@code p:contains(hello \(there\) finds p elements containing the text "Hello (There)"}
* :containsOwn(text)
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. p:containsOwn(jsoup)
finds p elements with own text "jsoup".