1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
Description: constructing Representer with a DumperOptions instance to comply
with the interface of snakeyaml 2.x
Author: Pierre Gruet <pgt@debian.org>
Forwarded: no
Last-Update: 2025-10-12
--- a/src/java/clj_yaml/MarkedConstructor.java
+++ b/src/java/clj_yaml/MarkedConstructor.java
@@ -1,5 +1,6 @@
package clj_yaml;
+import org.yaml.snakeyaml.LoaderOptions;
import org.yaml.snakeyaml.constructor.Construct;
import org.yaml.snakeyaml.constructor.Constructor;
import org.yaml.snakeyaml.constructor.SafeConstructor;
@@ -21,7 +22,7 @@
public MarkedConstructor() {
// Make sure SafeConstructor's constructor is called first,
// so that we overwrite the keys that SafeConstructor sets.
- super();
+ super(new LoaderOptions());
// Wrap all the constructors with Marking constructors.
for (Tag tag : tags) {
Construct old = this.yamlConstructors.get(tag);
--- a/src/clojure/clj_yaml/core.clj
+++ b/src/clojure/clj_yaml/core.clj
@@ -60,7 +60,7 @@
dumper (if dumper-options
(make-dumper-options :flow-style (:flow-style dumper-options))
(default-dumper-options))]
- (Yaml. constructor (Representer.) dumper loader)))
+ (Yaml. constructor (Representer. dumper) dumper loader)))
(defrecord Marked
[start end unmark])
|