#1 Indentation gone missing

closed-rejected
nobody
None
5
2006-09-19
2005-06-07
Rost Vashevnik
No

Greetings!

First of all, let me congratulate you on developing such a
useful product. We have integrated Jamon into
MetaBoss (our MDA product, see www.metaboss.com
for more details) and use for most of our code and
documentation generation. Jamon does the job
beautifully. Hopefully we did our bit in promoting Jamon
by acknowledging it on
http://metaboss.sourceforge.net/MetaBossDocSite/docs/
miscellaneous/acknowledgments/index.html (MetaBoss
acknowledgements page).

There is, however one nasty problem (and by the way
we have usied Jamon a lot over the last two years and
have only discovered one problem).
The template:
<%java>
……….
</%java>
This line is indented. Line 1
This line is indented. Line 2
This line is indented. Line 3
This line is indented. Line 4
<%java>
……….
</%java>

Will render like:

This line is indented. Line 1
This line is indented. Line 2
This line is indented. Line 3
This line is indented. Line 4

Basically the whitespace immediately after java closing
tag is lost. In order to combat this we put explicit
whitespace as follows:

<%java>
……….
</%java>
<% “ “ %>This line is indented. Line 1
This line is indented. Line 2
This line is indented. Line 3
This line is indented. Line 4
<%java>
……….
</%java>

This workaround works for us, but this is really a “hack”
and is not ideal.

Hopefully this may be fixed in the future release

Otherwise – Jamon rocks!!!

Thank you for your time

Kind regards

Rost Vashevnik

Discussion

  • Ian Robertson
    Ian Robertson
    2005-06-08

    Logged In: YES
    user_id=665928

    I'm glad to hear that jamon has worked out for you!

    As mentioned in the template reference manual
    (http://jamon.org/Reference.html), whitespace immediately
    following certain tags (including </%java> tags) is ignored.
    In our experience, this turns out to be helpfull far more
    often than nuisance.

    There are various workarounds; the one recommended in the
    template reference manual is:

    "If you would like to force whitespace to appear after one
    of the above tags, you can follow the tag with a backslash
    and a newline; whitespace after that will be emitted."

    So:

    <%java> .... <%/java>\ indented line...

     


Anonymous


Cancel   Add attachments