Removes starting and ending markup if no other 's exist @param s {string} the string to clean @returns the cleaned or original string
(s)
| 27 | @returns the cleaned or original string |
| 28 | */ |
| 29 | function clean(s){ |
| 30 | var org = s; |
| 31 | if (s && s.startsWith('<p>')) s = s.substr(3); |
| 32 | if (s && s.endsWith('</p>')) s = s.substr(0,s.length-4); |
| 33 | if (s && ((s.indexOf('<p>')>=0) || (s.indexOf('</p>')>=0))) return org; |
| 34 | return s; |
| 35 | } |
| 36 | |
| 37 | /** |
| 38 | Checks the source spec is in a format version and protocol we expect to see |
no outgoing calls
no test coverage detected