mbrevoort / CodeMirror2-xquery

In-browser code editor
http://codemirror.net/
Other
3 stars 1 forks source link

fixed persisting infinite loop on $" #18

Open clockworked247 opened 11 years ago

clockworked247 commented 11 years ago

Tested with the following XQuery strings:

$"

"^/([\w\d-])/?(update|create|delete).?(\w_)/?$"

let $pattern := fn:concat("^$")

"\uxxxxx"

fn:analyze-string("http://nssdc.gsfc.nasa.gov/ontologies/spacecraft#launchDate"\i\c*$")/s:match/fn:string()

matches($path, "^/[^/?#]+/documents/?$") Try to change "$path" to a new string with double-quotes. Chrome freaks out, rendering the UI frozen and eventually bringing up the Kill

interface.

clockworked247 commented 11 years ago

Hey Mike,

I went ahead and tried my hand at fixing the persisting $" issue with the XQuery mode parser. The change appears to fix the described uses of that string.