We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The problem happens when an attribute key or value is a collection and has items requiring escaping. Here is small snippet to reproduce it:
(gv/view (-> (gg/graph [1 2]) (ga/add-attr-to-edges :a ["AA."bb""] [[1 2]])))
The problem is in dot-attrs function. str on collection escapes it: user> (str ["AA."bb""]) "["AA.\"bb\""]"
I guess dot-attrs should be fully reworked somehow
The text was updated successfully, but these errors were encountered:
@vtzi can you explain what output you were expecting?
(str ["AA.\"bb\""]) => "[\"AA.\\\"bb\\\"\"]" (println "[\"AA.\\\"bb\\\"\"]") ["AA.\"bb\""] => nil
This looks like normal Clojure escaping to me?
Sorry, something went wrong.
@danielcompton the output of str is fine. the problem is that loom.io/dot-esc does not escape backslashes and graphviz gets really confused.
Escaping the backslash fixes the issue:
(defn- dot-esc [s](escape s {\ "\" " """ newline "\n"}))
No branches or pull requests
The problem happens when an attribute key or value is a collection and has items requiring escaping. Here is small snippet to reproduce it:
(gv/view (-> (gg/graph [1 2]) (ga/add-attr-to-edges :a ["AA."bb""] [[1 2]])))
The problem is in dot-attrs function. str on collection escapes it:
user> (str ["AA."bb""])
"["AA.\"bb\""]"
I guess dot-attrs should be fully reworked somehow
The text was updated successfully, but these errors were encountered: