aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorAndrey Somov <public.somov@gmail.com>2022-01-07 19:16:53 +0400
committerAndrey Somov <public.somov@gmail.com>2022-01-07 19:16:53 +0400
commite14de4c379873ee0238ce55cd3dfb8b877403766 (patch)
tree67717828884f6d0c0a0565adc99bea4b5229244c /src/main
parent51bd0edb9e09335ae7752a9d348a9c2a984afb7f (diff)
downloadsnakeyaml-e14de4c379873ee0238ce55cd3dfb8b877403766.tar.gz
Add comment and TODO for directives
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/yaml/snakeyaml/parser/ParserImpl.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/org/yaml/snakeyaml/parser/ParserImpl.java b/src/main/java/org/yaml/snakeyaml/parser/ParserImpl.java
index cee2f2db..a91146b9 100644
--- a/src/main/java/org/yaml/snakeyaml/parser/ParserImpl.java
+++ b/src/main/java/org/yaml/snakeyaml/parser/ParserImpl.java
@@ -317,6 +317,14 @@ public class ParserImpl implements Parser {
}
}
+ /**
+ * https://yaml.org/spec/1.1/#id898785 says "If the document specifies no directives,
+ * it is parsed using the same settings as the previous document.
+ * If the document does specify any directives,
+ * all directives of previous documents, if any, are ignored."
+ * TODO the last statement is not respected (as in PyYAML, to work the same)
+ * @return directives to be applied for the current document
+ */
@SuppressWarnings("unchecked")
private VersionTagsTuple processDirectives() {
HashMap<String, String> tagHandles = new HashMap<String, String>();