Closed pascalopitz closed 4 years ago
Thanks @pascalopitz for your contribution!
My regular expressions are a bit rusty, but replace(/#([_\w]+)#/gm, '<!-- #$1# -->')
will look for #...#
where the dots can be any A-Z
, a-z
, 0-9
or _
, which is then replaced by an XML comment, right?
I've tested the regular expression, and it seems that \w
already matches a _
. So the expression could be /#([\w]+)#/gm
.
Could you add a comment in the helper referring to the original issue, because this seems a pretty strange thing if someone would look at the code. If you add the below comment.
// This is to fix malformed xml in description see https://github.com/bencevans/node-sonos/issues/465
And commit it with this message (the format matters):
fix: Malformed xml in device description
Fixed #465
I will accept the change immediately, and because of the commit message format it will recognize it as new code to be automatically released as a new patch version.
:tada: This PR is included in version 1.13.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Addresses malformed device XML, see #465