[PATCH 1/2] stkutil: convert text attributes to html
Kristen Carlson Accardi
kristen at linux.intel.com
Mon Jun 21 19:51:06 PDT 2010
On Tue, 22 Jun 2010 00:45:39 +0200
andrzej zaborowski <balrogg at gmail.com> wrote:
> Can we always end_format() and start_format() when the formatting
> changes, and just once instead of in a loop? Here's a test case that
> I'm worried about:
>
> text is "abc"
> attribute 1 (red text) starts at 0, len 2
> attribute 2 (blue text) starts at 1, len 2
>
> the generated html, by my reading will look like this:
> <span style="color: red;">a<span style="color: blue;">b</span>c</span>
I ran this test just to make sure, the generated html is not as
you fear and is correct (I used different colors though)
<html><body><span style="color: #347235;background-color: #FFFFFF;">a<span style="color: #0000A0;background-color: #FFFFFF;">b</span></span>c</body></html>
I can add this exact test as a unit test if you would like.
More information about the ofono
mailing list