You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: Add HTML comment-based link ignoring
- Support <!-- link-validator-ignore-next --> for ignoring next link
- Support <!-- link-validator-ignore --> blocks for ignoring multiple links
- Fix UriHelpers to preserve scheme and port for external URLs
- Add comprehensive tests for comment-based ignore functionality
* refactor: Improve comment syntax for link ignoring
- Single <!-- link-validator-ignore --> now ignores just the next link
- <!-- begin link-validator-ignore --> / <!-- end link-validator-ignore --> for blocks
- More intuitive and consistent syntax
* docs: Add documentation for HTML comment-based link ignoring
LinkValidator supports HTML comments to exclude specific links from validation. This is useful for development URLs, local services, or intentionally broken example links.
157
+
158
+
#### Ignore Single Link
159
+
160
+
Use `<!-- link-validator-ignore -->` to ignore just the next link:
161
+
162
+
```html
163
+
<!-- link-validator-ignore -->
164
+
<ahref="http://localhost:3000">This link will be ignored</a>
165
+
<ahref="http://localhost:9090">This link will be validated</a>
166
+
```
167
+
168
+
#### Ignore Block of Links
169
+
170
+
Use `<!-- begin link-validator-ignore -->` and `<!-- end link-validator-ignore -->` to ignore all links within a section:
171
+
172
+
```html
173
+
<!-- begin link-validator-ignore -->
174
+
<div>
175
+
<p>These local development links won't be validated:</p>
0 commit comments