Open galtm opened 6 months ago
@galtm Thank you for the report! This sounds like a bug indeed. It is likely in the upstream project that @wolfgangmm drew on when he contributed the feature. That project, xqlint, has since changed its architecture in a way that makes it incompatible with eXide. Thus, I am not hopeful that a fix will be easy. (I, at least, lack the javascript skills that would be necessary to investigate the bug.) If we confirm the problem is irreparable, the solution may be to remove the feature, lest it cause damage to people's code.
@joewiz, Thanks for looking at this so quickly and for setting my expectations about the feasibility of a fix.
Describe the bug When I use XQuery > Format code on a certain function, some spaces get removed such that the code is no longer valid. The problem might be related to a code comment near the code that becomes invalid.
Expected behavior The code should be formatted differently but should still produce the same behavior.
To Reproduce
declare function local:myfcn( $arg as xs:integer ) as xs:string* {
(: Multiple-line comment that is not in eXist-db style :) if ($arg gt 0) then 'positive' else 'nonpositive' };
local:myfcn(1)
Screenshot
Context (please always complete the following information):
Additional context
conf.xml
? Not that I know of.