Skip to content
New issue

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

translation error #16

Open
kaktus42 opened this issue Jul 16, 2018 · 1 comment
Open

translation error #16

kaktus42 opened this issue Jul 16, 2018 · 1 comment

Comments

@kaktus42
Copy link

This code:

function l(a) {
    return q.test(a) ? '"' + a.replace(/\"/g, '""') + '"' : a
}

becomes the following unparsable code:

digraph cfg {
node [shape="box"]
subgraph cluster_0{
label = "function l(a)"
n0 [label="entry", style="rounded"]
n1 [label="return q.test(a) ? '\"' + a.replace(/\\"/g, '\"\"') + '\"' : a"]
n2 [label="exit", style="rounded"]
n0 -> n1 []
n1 -> n2 []
n1 -> n2 [color="red", label="exception"]

}
subgraph cluster_1{
label = "[[main]]"
n3 [label="entry", style="rounded"]
n4 [label="exit", style="rounded"]
n3 -> n4 []

}
}

that line should have one backslash more:

n1 [label="return q.test(a) ? '\"' + a.replace(/\\\"/g, '\"\"') + '\"' : a"]
@ChristianMurphy
Copy link
Collaborator

Good catch @kaktus42, would you be interested in opening a pull request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants