* @param {?string} maybeComment * @return {?Object}
(maybeComment)
| 50 | * @return {?Object} |
| 51 | */ |
| 52 | function isolateCommentJson(maybeComment) { |
| 53 | if (!maybeComment) { |
| 54 | return null; |
| 55 | } |
| 56 | |
| 57 | const json = maybeComment.replace('<!--', '').replace('-->', '').trim(); |
| 58 | if (!json) { |
| 59 | return null; |
| 60 | } |
| 61 | |
| 62 | try { |
| 63 | const options = JSON.parse(json); |
| 64 | return options; |
| 65 | } catch (_) { |
| 66 | return null; |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | /** |
| 71 | * @param {string} content |
no test coverage detected