{"id":18937524,"url":"https://github.com/verifytests/verify.anglesharp","last_synced_at":"2025-07-25T23:17:28.264Z","repository":{"id":42576014,"uuid":"259160919","full_name":"VerifyTests/Verify.AngleSharp","owner":"VerifyTests","description":"Extends Verify to allow comparison of html files via AngleSharp.","archived":false,"fork":false,"pushed_at":"2025-04-14T11:23:04.000Z","size":674,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-14T12:29:15.554Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VerifyTests.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"license.txt","code_of_conduct":"code_of_conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"VerifyTests"}},"created_at":"2020-04-27T00:08:47.000Z","updated_at":"2025-04-14T11:23:07.000Z","dependencies_parsed_at":"2023-12-27T04:40:42.243Z","dependency_job_id":"1ebba532-4554-4672-ae1d-8835041a21c4","html_url":"https://github.com/VerifyTests/Verify.AngleSharp","commit_stats":{"total_commits":564,"total_committers":4,"mean_commits":141.0,"dds":0.5088652482269503,"last_synced_commit":"2f1adb37572d6fc2e313a3ccada94c30abc5eaae"},"previous_names":["verifytests/verify.anglesharp.diffing"],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VerifyTests%2FVerify.AngleSharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VerifyTests%2FVerify.AngleSharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VerifyTests%2FVerify.AngleSharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VerifyTests%2FVerify.AngleSharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VerifyTests","download_url":"https://codeload.github.com/VerifyTests/Verify.AngleSharp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249129292,"owners_count":21217323,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T12:11:31.990Z","updated_at":"2025-07-25T23:17:28.251Z","avatar_url":"https://github.com/VerifyTests.png","language":"C#","funding_links":["https://github.com/sponsors/VerifyTests"],"categories":[],"sub_categories":[],"readme":"# \u003cimg src=\"/src/icon.png\" height=\"30px\"\u003e Verify.AngleSharp\n\n[![Discussions](https://img.shields.io/badge/Verify-Discussions-yellow?svg=true\u0026label=)](https://github.com/orgs/VerifyTests/discussions)\n[![Build status](https://ci.appveyor.com/api/projects/status/ff4ms9mevndkui7l?svg=true)](https://ci.appveyor.com/project/SimonCropp/Verify-AngleSharp)\n[![NuGet Status](https://img.shields.io/nuget/v/Verify.AngleSharp.svg)](https://www.nuget.org/packages/Verify.AngleSharp/)\n\nExtends [Verify](https://github.com/VerifyTests/Verify) with Html verification utilities via [AngleSharp](https://github.com/AngleSharp/AngleSharp).\u003c!-- singleLineInclude: intro. path: /docs/intro.include.md --\u003e\n\n**See [Milestones](../../milestones?state=closed) for release notes.**\n\n\n## Sponsors\n\n\n### Entity Framework Extensions\u003c!-- include: zzz. path: /docs/zzz.include.md --\u003e\n\n[Entity Framework Extensions](https://entityframework-extensions.net/?utm_source=simoncropp\u0026utm_medium=Verify.AngleSharp) is a major sponsor and is proud to contribute to the development this project.\n\n[![Entity Framework Extensions](https://raw.githubusercontent.com/VerifyTests/Verify.AngleSharp/refs/heads/main/docs/zzz.png)](https://entityframework-extensions.net/?utm_source=simoncropp\u0026utm_medium=Verify.AngleSharp)\u003c!-- endInclude --\u003e\n\n\n## NuGet\n\n * https://nuget.org/packages/Verify.AngleSharp\n\n\n## Comparer Usage\n\nExtends [Verify](https://github.com/VerifyTests/Verify) to allow [comparison](https://github.com/VerifyTests/Verify/blob/master/docs/comparer.md) of htm and html files via [AngleSharp](https://github.com/AngleSharp/AngleSharp.Diffing).\n\n\n### Initialize\n\nCall `VerifyAngleSharpDiffing.Initialize()` once at assembly load time.\n\nInitialize takes an optional `Action\u003cIDiffingStrategyCollection\u003e` to control settings at a global level:\n\n\u003c!-- snippet: Initialize --\u003e\n\u003ca id='snippet-Initialize'\u003e\u003c/a\u003e\n```cs\n[ModuleInitializer]\npublic static void Init() =\u003e\n    VerifyAngleSharpDiffing.Initialize();\n```\n\u003csup\u003e\u003ca href='/src/Tests/ModuleInitializer.cs#L3-L9' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-Initialize' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\n\n### Verify html\n\nGiven an existing verified file:\n\n\u003c!-- snippet: Samples.Sample.verified.html --\u003e\n\u003ca id='snippet-Samples.Sample.verified.html'\u003e\u003c/a\u003e\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\u003cbody\u003e\n  \u003ch1\u003eMy First Heading\u003c/h1\u003e\n  \u003cp\u003eMy first paragraph.\u003c/p\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\u003csup\u003e\u003ca href='/src/Tests/Samples.Sample.verified.html#L1-L7' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-Samples.Sample.verified.html' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\nAnd a test:\n\n\u003c!-- snippet: Sample --\u003e\n\u003ca id='snippet-Sample'\u003e\u003c/a\u003e\n```cs\n[Test]\npublic Task Sample()\n{\n    var html =\n        \"\"\"\n        \u003c!DOCTYPE html\u003e\n        \u003chtml\u003e\n          \u003cbody\u003e\n            \u003ch1\u003eMy First Heading\u003c/h1\u003e\n            \u003cp\u003eMy first paragraph.\u003c/p\u003e\n          \u003c/body\u003e\n        \u003c/html\u003e\n        \"\"\";\n    return Verify(html, \"html\");\n}\n```\n\u003csup\u003e\u003ca href='/src/Tests/Samples.cs#L196-L214' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-Sample' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\nNote that the input html differs from the verified html, but not in a semantically significant way. Hence this test will pass.\n\n\n### Diff results\n\nIf the comparison fails, the resulting differences will be included in the test result displayed to the user.\n\nFor example if, in the above html, `\u003ch1\u003eMy First Heading\u003c/h1\u003e` changes to `\u003ch1\u003eFirst Heading\u003c/h1\u003e` then the following will be printed in the test results:\n\n```\nComparer result:\n * Node Diff\n   Path: h1(0) \u003e #text(0)\n   Received: First Heading\n   Verified: My First Heading\n```\n\n\n### Test level settings\n\nSettings can also be controlled for a specific test.\n\n\u003c!-- snippet: CustomOptions --\u003e\n\u003ca id='snippet-CustomOptions'\u003e\u003c/a\u003e\n```cs\nvar settings = new VerifySettings();\nsettings.AngleSharpDiffingSettings(\n    action =\u003e\n    {\n        static FilterDecision SpanFilter(\n            in ComparisonSource source,\n            FilterDecision decision)\n        {\n            if (source.Node.NodeName == \"SPAN\")\n            {\n                return FilterDecision.Exclude;\n            }\n\n            return decision;\n        }\n\n        var options = action.AddDefaultOptions();\n        options.AddFilter(SpanFilter);\n    });\n```\n\u003csup\u003e\u003ca href='/src/Tests/Samples.cs#L244-L266' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-CustomOptions' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\n\n### Global settings\n\n\u003c!-- snippet: CustomOptionsGlobal --\u003e\n\u003ca id='snippet-CustomOptionsGlobal'\u003e\u003c/a\u003e\n```cs\nVerifyAngleSharpDiffing.Initialize(\n    action =\u003e\n    {\n        static FilterDecision SpanFilter(\n            in ComparisonSource source,\n            FilterDecision decision)\n        {\n            if (source.Node.NodeName == \"SPAN\")\n            {\n                return FilterDecision.Exclude;\n            }\n\n            return decision;\n        }\n\n        var options = action.AddDefaultOptions();\n        options.AddFilter(SpanFilter);\n    });\n```\n\u003csup\u003e\u003ca href='/src/Tests/Samples.cs#L282-L302' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-CustomOptionsGlobal' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\n\n### Verify svg\n\nGiven an existing verified file:\n\n\u003c!-- snippet: Samples.SvgSample.verified.svg --\u003e\n\u003ca id='snippet-Samples.SvgSample.verified.svg'\u003e\u003c/a\u003e\n```svg\n\u003csvg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"\n     width=\"300\" height=\"200\"\u003e\n  \u003crect fill=\"red\" width=\"100%\" height=\"100%\" /\u003e\n  \u003ccircle fill=\"green\" cx=\"150\" cy=\"100\" r=\"80\" /\u003e\n  \u003ctext fill=\"white\"\n        x=\"150\" y=\"125\"\n        font-size=\"60\"\n        text-anchor=\"middle\"\u003e\n  SVG\n  \u003c/text\u003e\n\u003c/svg\u003e\n```\n\u003csup\u003e\u003ca href='/src/Tests/Samples.SvgSample.verified.svg#L1-L11' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-Samples.SvgSample.verified.svg' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\nAnd a test:\n\n\u003c!-- snippet: SvgSample --\u003e\n\u003ca id='snippet-SvgSample'\u003e\u003c/a\u003e\n```cs\n[Test]\npublic Task SvgSample()\n{\n    var svg =\n        \"\"\"\n        \u003csvg version=\"1.1\"\n             width=\"300\" height=\"200\"\n             xmlns=\"http://www.w3.org/2000/svg\"\u003e\n          \u003crect width=\"100%\" height=\"100%\" fill=\"red\" /\u003e\n          \u003ccircle cx=\"150\" cy=\"100\" r=\"80\" fill=\"green\" /\u003e\n          \u003ctext x=\"150\" y=\"125\"\n                font-size=\"60\"\n                text-anchor=\"middle\"\n                fill=\"white\"\u003e\n          SVG\n          \u003c/text\u003e\n        \u003c/svg\u003e\n        \"\"\";\n    return Verify(svg, \"svg\");\n}\n```\n\u003csup\u003e\u003ca href='/src/Tests/Samples.cs#L216-L239' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-SvgSample' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\nNote that the input svg differs from the verified svg, but not in a semantically significant way. Hence this test will pass.\n\n\n## Pretty Print\n\nHtml can be pretty printed.\n\n\u003c!-- snippet: PrettyPrintHtml --\u003e\n\u003ca id='snippet-PrettyPrintHtml'\u003e\u003c/a\u003e\n```cs\n[Test]\npublic Task PrettyPrintHtml()\n{\n    var html = \"\"\"\n               \u003c!DOCTYPE html\u003e\n               \u003chtml\u003e\u003cbody\u003e\u003ch1\u003eMy First Heading\u003c/h1\u003e\n               \u003cp\u003eMy first paragraph.\u003c/p\u003e\u003c/body\u003e\u003c/html\u003e\n               \"\"\";\n    return Verify(html, \"html\")\n        .PrettyPrintHtml();\n}\n```\n\u003csup\u003e\u003ca href='/src/Tests/Samples.cs#L4-L18' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-PrettyPrintHtml' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\nResults in \n\n\u003c!-- snippet: Samples.PrettyPrintHtml.verified.html --\u003e\n\u003ca id='snippet-Samples.PrettyPrintHtml.verified.html'\u003e\u003c/a\u003e\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n  \u003chead\u003e\u003c/head\u003e\n  \u003cbody\u003e\n    \u003ch1\u003eMy First Heading\u003c/h1\u003e\n    \u003cp\u003eMy first paragraph.\u003c/p\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\u003csup\u003e\u003ca href='/src/Tests/Samples.PrettyPrintHtml.verified.html#L1-L8' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-Samples.PrettyPrintHtml.verified.html' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\nTo apply this to all `html` files use `HtmlPrettyPrint.All();`\n\n\n### Manipulate Html\n\nNodes can be manipulated as part of the pretty print:\n\n\u003c!-- snippet: PrettyPrintHtmlWithNodeManipulation --\u003e\n\u003ca id='snippet-PrettyPrintHtmlWithNodeManipulation'\u003e\u003c/a\u003e\n```cs\n[Test]\npublic Task PrettyPrintHtmlWithNodeManipulation()\n{\n    var html = \"\"\"\n               \u003c!DOCTYPE html\u003e\n               \u003chtml\u003e\n                 \u003cbody\u003e\n                   \u003ch1\u003eMy First Heading\u003c/h1\u003e\n                   \u003cp\u003eMy first paragraph.\u003c/p\u003e\n                 \u003c/body\u003e\n               \u003c/html\u003e\n               \"\"\";\n    return Verify(html, \"html\")\n        .PrettyPrintHtml(\n            nodes =\u003e\n            {\n                foreach (var node in nodes.QuerySelectorAll(\"h1\"))\n                {\n                    node.Remove();\n                }\n            });\n}\n```\n\u003csup\u003e\u003ca href='/src/Tests/Samples.cs#L144-L169' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-PrettyPrintHtmlWithNodeManipulation' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\nResults in \n\n\u003c!-- snippet: Samples.PrettyPrintHtmlWithNodeManipulation.verified.html --\u003e\n\u003ca id='snippet-Samples.PrettyPrintHtmlWithNodeManipulation.verified.html'\u003e\u003c/a\u003e\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n  \u003chead\u003e\u003c/head\u003e\n  \u003cbody\u003e\n    \u003cp\u003eMy first paragraph.\u003c/p\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\u003csup\u003e\u003ca href='/src/Tests/Samples.PrettyPrintHtmlWithNodeManipulation.verified.html#L1-L7' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-Samples.PrettyPrintHtmlWithNodeManipulation.verified.html' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\n\n## AngleSharp helpers\n\n\n### ScrubEmptyDivs\n\n\u003c!-- snippet: ScrubEmptyDivs --\u003e\n\u003ca id='snippet-ScrubEmptyDivs'\u003e\u003c/a\u003e\n```cs\n[Test]\npublic Task ScrubEmptyDivs()\n{\n    var html = \"\"\"\n               \u003c!DOCTYPE html\u003e\n               \u003chtml\u003e\n                 \u003cbody\u003e\n                   \u003cdiv\u003eMy First Heading\u003c/div\u003e\n                   \u003cdiv\u003e\u003c/div\u003e\n                 \u003c/body\u003e\n               \u003c/html\u003e\n               \"\"\";\n    return Verify(html, \"html\")\n        .PrettyPrintHtml(nodes =\u003e nodes.ScrubEmptyDivs());\n}\n```\n\u003csup\u003e\u003ca href='/src/Tests/Samples.cs#L20-L38' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-ScrubEmptyDivs' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\nResults in:\n\n\u003c!-- snippet: Samples.ScrubEmptyDivs.verified.html --\u003e\n\u003ca id='snippet-Samples.ScrubEmptyDivs.verified.html'\u003e\u003c/a\u003e\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n  \u003chead\u003e\u003c/head\u003e\n  \u003cbody\u003e\n    \u003cdiv\u003eMy First Heading\u003c/div\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\u003csup\u003e\u003ca href='/src/Tests/Samples.ScrubEmptyDivs.verified.html#L1-L7' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-Samples.ScrubEmptyDivs.verified.html' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\n\n### ScrubAttributes\n\n\n#### Removal\n\n\u003c!-- snippet: ScrubAttributes --\u003e\n\u003ca id='snippet-ScrubAttributes'\u003e\u003c/a\u003e\n```cs\n[Test]\npublic Task ScrubAttributes()\n{\n    var html = \"\"\"\n               \u003c!DOCTYPE html\u003e\n               \u003chtml\u003e\n                 \u003cbody\u003e\n                   \u003cdiv id='a'\u003eMy First Heading\u003c/div\u003e\n                 \u003c/body\u003e\n               \u003c/html\u003e\n               \"\"\";\n    return Verify(html, \"html\")\n        .PrettyPrintHtml(nodes =\u003e nodes.ScrubAttributes(\"id\"));\n}\n```\n\u003csup\u003e\u003ca href='/src/Tests/Samples.cs#L40-L57' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-ScrubAttributes' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\nResults in:\n\n\u003c!-- snippet: Samples.ScrubAttributes.verified.html --\u003e\n\u003ca id='snippet-Samples.ScrubAttributes.verified.html'\u003e\u003c/a\u003e\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n  \u003chead\u003e\u003c/head\u003e\n  \u003cbody\u003e\n    \u003cdiv\u003eMy First Heading\u003c/div\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\u003csup\u003e\u003ca href='/src/Tests/Samples.ScrubAttributes.verified.html#L1-L7' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-Samples.ScrubAttributes.verified.html' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\n\n#### Replace Value\n\n\u003c!-- snippet: ScrubAttributeWithNewValue --\u003e\n\u003ca id='snippet-ScrubAttributeWithNewValue'\u003e\u003c/a\u003e\n```cs\n[Test]\npublic Task ScrubAttributeWithNewValue()\n{\n    var html = \"\"\"\n               \u003c!DOCTYPE html\u003e\n               \u003chtml\u003e\n                 \u003cbody\u003e\n                   \u003cdiv id='a'\u003eMy First Heading\u003c/div\u003e\n                 \u003c/body\u003e\n               \u003c/html\u003e\n               \"\"\";\n    return Verify(html, \"html\")\n        .PrettyPrintHtml(\n            nodes =\u003e nodes.ScrubAttributes(x =\u003e\n            {\n                if (x.Name == \"id\")\n                {\n                    return \"new value\";\n                }\n\n                return null;\n            }));\n}\n```\n\u003csup\u003e\u003ca href='/src/Tests/Samples.cs#L59-L85' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-ScrubAttributeWithNewValue' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\nResults in:\n\n\u003c!-- snippet: Samples.ScrubAttributeWithNewValue.verified.html --\u003e\n\u003ca id='snippet-Samples.ScrubAttributeWithNewValue.verified.html'\u003e\u003c/a\u003e\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n  \u003chead\u003e\u003c/head\u003e\n  \u003cbody\u003e\n    \u003cdiv id=\"new value\"\u003eMy First Heading\u003c/div\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\u003csup\u003e\u003ca href='/src/Tests/Samples.ScrubAttributeWithNewValue.verified.html#L1-L7' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-Samples.ScrubAttributeWithNewValue.verified.html' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\n### ScrubAspCacheBusterTagHelper\n\n\u003c!-- snippet: ScrubAspCacheBusterTagHelper --\u003e\n\u003ca id='snippet-ScrubAspCacheBusterTagHelper'\u003e\u003c/a\u003e\n```cs\n[Test]\npublic Task ScrubAspCacheBusterTagHelper()\n{\n    var html = \"\"\"\n               \u003c!DOCTYPE html\u003e\n               \u003chtml\u003e\n                 \u003chead\u003e\n                   \u003clink\n                    href=\"/css/site.css?v=r2K1aJs2_7mdAedOAb0OQw3K46ElgPZWqeuI\"\n                    rel=\"stylesheet\"\n                    /\u003e\n                 \u003c/head\u003e\n                 \u003cbody\u003e\n                   \u003ch1\u003eMy Heading\u003c/h1\u003e\n                 \u003c/body\u003e\n               \u003c/html\u003e\n               \"\"\";\n    return Verify(html, \"html\")\n        .PrettyPrintHtml(nodes =\u003e nodes.ScrubAspCacheBusterTagHelper());\n}\n```\n\u003csup\u003e\u003ca href='/src/Tests/Samples.cs#L87-L110' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-ScrubAspCacheBusterTagHelper' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\nResults in:\n\n\u003c!-- snippet: Samples.ScrubAspCacheBusterTagHelper.verified.html --\u003e\n\u003ca id='snippet-Samples.ScrubAspCacheBusterTagHelper.verified.html'\u003e\u003c/a\u003e\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003clink href=\"/css/site.css?v={TAG_HELPER_VERSION}\" rel=\"stylesheet\"\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003ch1\u003eMy Heading\u003c/h1\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\u003csup\u003e\u003ca href='/src/Tests/Samples.ScrubAspCacheBusterTagHelper.verified.html#L1-L9' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-Samples.ScrubAspCacheBusterTagHelper.verified.html' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\n### ScrubBrowserLink\n\n\u003c!-- snippet: ScrubBrowserLink --\u003e\n\u003ca id='snippet-ScrubBrowserLink'\u003e\u003c/a\u003e\n```cs\n[Test]\npublic Task ScrubBrowserLink()\n{\n    var html = \"\"\"\n               \u003c!DOCTYPE html\u003e\n               \u003chtml\u003e\n                 \u003chead\u003e\n                   \u003cmeta charset=\"utf-8\"\u003e\n                 \u003c/head\u003e\n                 \u003cbody\u003e\n                   \u003ch1\u003eMy Heading\u003c/h1\u003e\n\n                   \u003c!-- Visual Studio Browser Link --\u003e\n                   \u003cscript src=\"/_vs/browserLink\"\u003e\n                   \u003c/script\u003e\n\n                   \u003cscript src=\"/_framework/aspnetcore-browser-refresh.js\"\u003e\n                   \u003c/script\u003e\n                   \u003c!-- End Browser Link --\u003e\n\n                   \u003c/body\u003e\n               \u003c/html\u003e\n               \"\"\";\n    return Verify(html, \"html\")\n        .PrettyPrintHtml(nodes =\u003e nodes.ScrubBrowserLink());\n}\n```\n\u003csup\u003e\u003ca href='/src/Tests/Samples.cs#L112-L142' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-ScrubBrowserLink' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\nResults in:\n\n\u003c!-- snippet: Samples.ScrubBrowserLink.verified.html --\u003e\n\u003ca id='snippet-Samples.ScrubBrowserLink.verified.html'\u003e\u003c/a\u003e\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003cmeta charset=\"utf-8\"\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003ch1\u003eMy Heading\u003c/h1\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\u003csup\u003e\u003ca href='/src/Tests/Samples.ScrubBrowserLink.verified.html#L1-L9' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-Samples.ScrubBrowserLink.verified.html' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fverifytests%2Fverify.anglesharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fverifytests%2Fverify.anglesharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fverifytests%2Fverify.anglesharp/lists"}