(fix): fix escaping of backslashes in graph generation (#897)

Fixes #884
This commit is contained in:
Jethro Kuan
2020-07-07 13:07:10 +08:00
committed by GitHub
parent 9766862e84
commit d19a711a44
2 changed files with 10 additions and 1 deletions

View File

@ -198,8 +198,10 @@ into a digraph."
(`truncate (s-truncate org-roam-graph-max-title-length title))
(`wrap (s-word-wrap org-roam-graph-max-title-length title))
(_ title)))
(shortened-title (org-roam-string-quote shortened-title))
(title (org-roam-string-quote title))
(node-properties
`(("label" . ,(s-replace "\"" "\\\"" shortened-title))
`(("label" . ,shortened-title)
("URL" . ,(concat "org-protocol://roam-file?file=" (url-hexify-string file)))
("tooltip" . ,(xml-escape-string title)))))
(insert