matrix-org / matrix-appservice-irc

Node.js IRC bridge for Matrix
Apache License 2.0
460 stars 151 forks source link

Use s/.../.../g syntax to avoid repetition #1623

Open progval opened 1 year ago

progval commented 1 year ago

For example, from #matrix-spec:

11:55:35 <Cat[m]> like the concern is that if someone decides to be funny and set a expiry timestamp for 70372018801 some implementation could cry if they parse it. But since the spec expects you to not be silly and be unable to deal with a timestamp of 70372018801 you can expect this to be safe 
11:56:32 <Cat[m]> Also for those who dont feel like trying to figure out what that timestamp is its supposedly the timestamp for the first second of 4200
11:57:04 <Cat[m]> s/70372018801/70372018800/, s/70372018801/70372018800/

which could be:

11:55:35 <Cat[m]> like the concern is that if someone decides to be funny and set a expiry timestamp for 70372018801 some implementation could cry if they parse it. But since the spec expects you to not be silly and be unable to deal with a timestamp of 70372018801 you can expect this to be safe 
11:56:32 <Cat[m]> Also for those who dont feel like trying to figure out what that timestamp is its supposedly the timestamp for the first second of 4200
11:57:04 <Cat[m]> s/70372018801/70372018800/g