find-conditional-comments
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -13,2 +13,3 @@ const CONDITIONAL_COMMENT_REGEX = /(<!(--)?\[if\s[()\w\s|&!]+\]>(?:<!--+>)?)((?:.|\n)*?)((?:<!--)?<!\[endif\]\2>)/gi; | ||
comments.push({ | ||
isComment: open.startsWith("<!--"), | ||
open, | ||
@@ -15,0 +16,0 @@ close, |
{ | ||
"name": "find-conditional-comments", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Finds all conditional comments in a string", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -36,2 +36,8 @@ # find-conditional-comments | ||
### isComment | ||
> `boolean` | ||
Whether the comment is an HTML comment. This might be `false` for certain items when `downlevel` is `revealed`. | ||
#### open | ||
@@ -47,7 +53,46 @@ > `String` | ||
### bubble | ||
> `boolean` | ||
Whether the comment "bubbles" around the value. | ||
When `true`, the comment is visible to all platforms except those that support conditional comments. | ||
``` | ||
<!--[if !mso]>--> | ||
Hello, Not Microsoft Outlook! | ||
<!--<![endif]--> | ||
``` | ||
When `false`, the comment is hidden from all platforms except those that support conditional comments. | ||
``` | ||
<!--[if mso]> | ||
Hello, Microsoft Outlook! | ||
<![endif]--> | ||
``` | ||
#### downlevel | ||
> `String` | ||
Either `hidden` or `revealed`. [Learn more](https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/compatibility/ms537512(v%3dvs.85)#downlevel-hidden-conditional-comments). | ||
Either `hidden` or `revealed`. | ||
`hidden` means the comment is hidden from all platforms except those that support conditional comments. | ||
`revealed` means the comment is visible to all platforms except those that support conditional comments. | ||
This is very similar to the `bubble` property, but it's not the same. | ||
`downlevel` always be `revealed` if `bubble` is `true`. | ||
But `bubble` can be `true` even if `downlevel` is `hidden` when using this syntax: | ||
```html | ||
<![if lt IE 8]> | ||
<p>Please upgrade to Internet Explorer version 8.</p> | ||
<![endif]> | ||
``` | ||
[Learn more](https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/compatibility/ms537512(v%3dvs.85)#downlevel-hidden-conditional-comments). | ||
#### range | ||
@@ -54,0 +99,0 @@ > `Array` |
Sorry, the diff of this file is not supported yet
9503
8
109
107