10 Replies Latest reply on Sep 19, 2007 8:20 AM by demetrio812

    Seam Text and \n

    demetrio812

      Hi,
      I noticed that if I put a \n in the text rendered by <s:formattedText /> it doen's put a so I have to put \n\n to have a new paragraph but this is not the formatting I want...

      is it a bug or a "feature"?

      Can I implement some extension by myslef to add to standards one?

      Thanks

      Demetrio Filocamo

        • 1. Re: Seam Text and \n
          christian.bauer

          This is expected, you need to two \n to create a new paragraph.

          • 2. Re: Seam Text and \n
            demetrio812

            but if I just want a line break (I mean a < br / >, in the first post it was hidden)? without a new paragraph
            like this line I'm writing...I can't...

            how can I do to extend it?
            I need it coz all ppl that are using my app when they put a new line they aspect a new line in the result too so they see that like a bug...

            thanks...

            Demetrio

            • 3. Re: Seam Text and \n
              christian.bauer

              Edit seam-text.g, run 'ant clean' and 'ant' in the Seam distribution.

              • 4. Re: Seam Text and \n
                demetrio812

                Thanks, I will try, isn't there a way to add rules dynamically? I also want to add some application-related rules and this would be very cool...

                I'm not an expert on this but if you give me the start I will try...

                Thanks...

                Demetrio

                • 5. Re: Seam Text and \n
                  demetrio812

                  Hi,
                  I think that not supporting is a bug, can I open a JIRA?

                  also, is there some news about the possibility to dinamically extending Seam Text?

                  Thanks

                  Demetrio

                  • 6. Re: Seam Text and \n
                    demetrio812

                    Is there someone can answer here?

                    thanks

                    Demetrio

                    • 7. Re: Seam Text and \n
                      matt.drees

                      Seam Text is implemented by a lexer/parser generated by Antlr at buildtime. So, adding formatting rules at runtime isn't possible (AFAIK).

                      • 8. Re: Seam Text and \n
                        demetrio812

                        I see, even if I think a pluggable system over the antlr-generated base would be useful (even if for simpler expressions)...

                        btw so I think that the \n problem is a bug...

                        also I propose to change the "/" character for italic because it is very common in language and a lot of ppl using it wrong forgotting that it is a special character...

                        I know it's difficult to do coz of backwards compatibility, but I think we have to discuss this, what do you think?

                        demetrio

                        • 9. Re: Seam Text and \n
                          pmuir

                          Christian wrote some extensions for SeamText in the wiki - I don't know if they are the style you are looking for.

                          I don't think the \n is a bug - it's the syntax for SeamText. And I don't think we can change the language at this late a date. Interactive preview combined with Matt's validator shouldn't make either of these a large issue right?

                          • 10. Re: Seam Text and \n
                            demetrio812

                            I know about the difficult of changing language now...

                            thanks I will check the wiki...

                            demetrio