-
-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
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
- Enter this code in eXide:
xquery version "3.1";
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)- Select all the text (or only the function declaration)
- Select XQuery > Format code
The function declaration now looks like this, with no spaces around the gt operator:
declare function local:myfcn($arg as xs:integer)
as xs:string*
{
(:
: Multiple-line comment that is
: not in eXist-db style
:)if($arggt0)then'positive'else'nonpositive'};Context (please always complete the following information):
- OS: Windows 10
- eXist-db Version: 6.2.0
- Java Version:
openjdk version "11.0.16" 2022-07-19 LTS
OpenJDK Runtime Environment Microsoft-38106 (build 11.0.16+8-LTS)
OpenJDK 64-Bit Server VM Microsoft-38106 (build 11.0.16+8-LTS, mixed mode)
- App Version: 3.5.0
Additional context
- How is eXist-db installed? I'm a new eXist-db user and I followed instructions at https://exist-db.org/exist/apps/doc/basic-installation .
- Any custom changes in e.g.
conf.xml? Not that I know of.
Reactions are currently unavailable
