Strange behaviour on generating text - Indentations do not match [message #1798688] |
Thu, 22 November 2018 17:45 |
Parsa Pourali Messages: 210 Registered: February 2014 |
Senior Member |
|
|
Hello,
I am facing an strange behaviour when generating my xml file with Acceleo. Some times it inserts more indentation than what I have set and sometimes it is working fine. It is weird to me because if the indentation is set, then it should be there always and not sometimes. I have check all over my code and the indentation looks to be good (as I said it works sometimes). Has anyone ever faced such issue? Is there anything else that I should take into the account?
Thanks,
Parsa
[Updated on: Thu, 22 November 2018 20:30] Report message to a moderator
|
|
|
|
Re: Strange behaviour on generating text - Indentations do not match [message #1798752 is a reply to message #1798691] |
Fri, 23 November 2018 14:34 |
Parsa Pourali Messages: 210 Registered: February 2014 |
Senior Member |
|
|
Hi Ed,
Yes, I read about post treatments but I thought maybe there is something wrong with my code! I guess I should work with some functions like replaceAll or so to come up with a solution for it then.
I have the following template:
[template public generateClassTag(clazz : information::Class) ? (hasSuperClass(clazz))]
generateClassWithSuperClassTag
someothertext
[/template]
The strange thing is that it generates the "generateClassWithSuperClassTag" text without any indentation in the line, but for the next line it generates indentation before the "someothertext". So, the result is something like:
generateClassWithSuperClassTag
someothertext
Tried ['\n'/] instead of Enter line break and still the same result.
Thanks :)
Parsa
[Updated on: Fri, 23 November 2018 16:42] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.73432 seconds