← Back to team overview

launchpad-dev team mailing list archive

Re: lazr-js multiline editor weirdness

 

On Wed, Oct 21, 2009 at 10:13 PM, Tim Penhey <tim.penhey@xxxxxxxxxxxxx> wrote:
> On Thu, 22 Oct 2009 15:52:53 Deryck Hodge wrote:
>> Hi, Tim.
>>
>> On Wed, Oct 21, 2009 at 9:28 PM, Tim Penhey <tim.penhey@xxxxxxxxxxxxx>
> wrote:
>> > All works well as long as there are no carriage returns.  Once you add
>> > some, the rendering all goes to pot.
>> >
>> > I've verified this with lp:lazr-js example code for the multi-line
>> > editor.
>> >
>> > What confuses me though is how come the bugs description works?  I can't
>> > find any difference.
>>
>> Take a look at the activation template string in
>> lib.canonical.widgets.lazrjs.TextAreaEditorWidget.  There is a
>> formatter config option that takes the XHTML and formats it nicely.
>> This has to be done because the xhtml response is in <dd> tags via the
>> API.  It's also not tested in the lazr-js example because it's
>> dependent on our real XHR response, so it seemed silly to mock just so
>> the test formatted nicely.  It's hackish, I know.  But I couldn't
>> really work out a nicer way to do it.
>
> OK, the question then becomes: how come the formatter works for bug
> descriptions, but not merge proposal commit messages?
>

Maybe some difference between the format of xhtml?  Take a look in
firebug at what each one is returning in the POST response.  That's
all that comes to mind right now, i.e. that the formatter's
assumptions about what the xhtml looks like are wrong for mp messages.

Cheers,
deryck



References