Hi,
I'm getting extra spaces after a node replace.
Code:
*let **$original* := <div><p>I love flowers (<specify/>).</p> <p>I love flowers: <specify/>.</p></div>
*let* *$specify* := <b><i>red, yellow and white ones</i></b>
*let* *$new* := *copy* *$copy* := *$original* *modify*(*for **$prompt* *in **$copy*//*specify* *return **replace* *node* *$prompt* *with* * $specify*) *return **$copy*
I would expect $new to give:
I love flowers (*red, yellow and white ones*).
I love flowers: *red, yellow and white ones*.
But I get extra spaces inside the parenthesis of the first sentence and before the period of the second sentence:
I love flowers (* red, yellow and white ones** *).
I love flowers: *red, yellow and white ones** *.
You can try my .xqm on BaseX 7.7
1. Create a DB 'test' with chop white spaces to 'no'. 2. Run access http://*localhost:8984*/test-extra-spaces/test-1 from your browser. 3. Look at the .xml in the test DB. It has extra carriage return. It looks like the query assumed that <i> was a block and it felt compelled to add a carriage return and indent.