[Merge] lp:~michael-sheldon/webbrowser-app/ssl-status into lp:webbrowser-app

Michael Sheldon michael.sheldon at canonical.com
Mon Sep 22 12:01:47 UTC 2014


> 365     +                    onTextChanged: {
> 366     +                        // Remove any blank lines caused by missing
> entries
> 367     +                        while(subjectAddress.text.indexOf("\n\n") !=
> -1) {
> 368     +                            subjectAddress.text =
> subjectAddress.text.replace("\n\n", "\n")
> 369     +                        }
> 370     +                    }
> 
> Wouldn’t it be much easier to just do that where 'text' is assigned:
> 
>     text: i18n.tr("[…]").arg([…]).replace(/\n\n/g, "\n")

Yeah, the problem with that was that since it was only a single pass it could leave extra white space when there'd been three blank lines. But I just realised I could match against /\n+/g to fix that, so I've committed a tidier implementation now.
-- 
https://code.launchpad.net/~michael-sheldon/webbrowser-app/ssl-status/+merge/235309
Your team Ubuntu Phablet Team is subscribed to branch lp:webbrowser-app.



More information about the Ubuntu-reviews mailing list