[Asterisk-code-review] rest-api-templates/asterisk processor - replace http line br... (asterisk[13])

Sean Bright asteriskteam at digium.com
Mon Feb 25 17:01:39 CST 2019


Sean Bright has posted comments on this change. ( https://gerrit.asterisk.org/11039 )

Change subject: rest-api-templates/asterisk_processor - replace http line breaks with line feed
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.asterisk.org/#/c/11039/1/rest-api-templates/asterisk_processor.py
File rest-api-templates/asterisk_processor.py:

https://gerrit.asterisk.org/#/c/11039/1/rest-api-templates/asterisk_processor.py@49
PS1, Line 49:     str = str.replace('<br />', '\n').replace(
            :         '<br/>', '\n').replace('<br>', '\n')
Why do something straight-forward like a string replace when you can use regular expressions to complicate it?

 re.sub(r'<br\s*/?>', '\n', str)



-- 
To view, visit https://gerrit.asterisk.org/11039
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie1c9faa0d1c5d622804cc0a21ce769095b08aa3d
Gerrit-Change-Number: 11039
Gerrit-PatchSet: 1
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Friendly Automation (1000185)
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
Gerrit-Comment-Date: Mon, 25 Feb 2019 23:01:39 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190225/40b42de7/attachment.html>


More information about the asterisk-code-review mailing list