jed-users mailing list

[2005 Date Index] [2005 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: small problem with indentation in xmlmode


Juho Snellman schrieb:
On Mon, Feb 28, 2005 at 02:24:54PM +0100, Joachim Schmitz wrote:

<tal:block metal:fill-slot="main"
	     tal:define="item options/item;
	     form_url     string:${request/URL1};
	     fields options/fields;
	     conference options/conference">
	     <div>
   ^<div should actually be here
   <span tal:condition="item" tal:content="conference/title" />
     ^<span should actually be here
 </div>
   ^</div> should actually be here

this only happens after a multiline attributes value. Can you give me a hint where to change this ?


Since it's valid for XML attributes to contain an unescaped '>' the
indentation routine can't consider a tag ended when it sees one, but
needs to check whether it's inside a string. This is done with the jed library function parse_to_point(), which has been configured to
not consider multi-line strings in xmlmode. The latter '"' is
therefore considered to start a new string, and the '>' that should
end the start-tag is ignored.

The "solutions" that I can see are:
  * Add a newline after the end of the multi-line attribute, before
    the '>'.

that did it, and is a perfectly acceptable workaround for this.

thanks a lot.



--
Mit freundlichen Grüßen                                Joachim Schmitz
......................................................................
AixtraWare eK ..Joachim Schmitz ..www.aixtraware.de ..t: +49-2464-8851
Hüsgenstr. 33a .....d-52457 Aldenhoven .............f: +49-2464-905163


--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2005 date index] [2005 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]