mirror of https://github.com/Wilfred/difftastic/
Add HTML parser
parent
edce245beb
commit
d131ae1d35
@ -0,0 +1,58 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Example Domain</title>
|
||||
|
||||
<!-- demo for difftastic -->
|
||||
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style type="text/css">
|
||||
body {
|
||||
background-color: #fdfdff;
|
||||
margin: 10;
|
||||
padding: 10;
|
||||
font-family: Helvetica, Arial, sans-serif;
|
||||
}
|
||||
#main {
|
||||
width: 600px;
|
||||
margin: 5em auto;
|
||||
padding: 2em;
|
||||
background-color: #f0f0f2;
|
||||
border-radius: 0.5em;
|
||||
box-shadow: 2px 3px 7px 2px rgba(0, 0, 0, 0.02);
|
||||
}
|
||||
a:link,
|
||||
a:visited {
|
||||
color: #38488f;
|
||||
text-decoration: none;
|
||||
}
|
||||
@media (max-width: 700px) {
|
||||
div {
|
||||
margin: 0 auto;
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="main">
|
||||
<h1>Example Domain</h1>
|
||||
<p>
|
||||
This domain is for use in illustrative examples in documents. You may
|
||||
use this domain in literature without prior coordination or asking for
|
||||
permission.
|
||||
</p>
|
||||
<p>
|
||||
<a href="https://www.iana.org/domains/example?utm_src=example-dot-org"
|
||||
>More information...</a
|
||||
>
|
||||
</p>
|
||||
</div>
|
||||
<script>
|
||||
alert("goodbye!");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,49 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Example Domain</title>
|
||||
|
||||
<!-- demo for tree-sitter -->
|
||||
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style type="text/css">
|
||||
body {
|
||||
background-color: #f0f0f2;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
|
||||
}
|
||||
div {
|
||||
width: 600px;
|
||||
margin: 5em auto;
|
||||
padding: 2em;
|
||||
background-color: #fdfdff;
|
||||
border-radius: 0.5em;
|
||||
box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02);
|
||||
}
|
||||
a:link, a:visited {
|
||||
color: #38488f;
|
||||
text-decoration: none;
|
||||
}
|
||||
@media (max-width: 700px) {
|
||||
div {
|
||||
margin: 0 auto;
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div>
|
||||
<h1>Example Domain</h1>
|
||||
<p>This domain is for use in illustrative examples in documents. You may use this
|
||||
domain in literature without prior coordination or asking for permission.</p>
|
||||
<p><a href="https://www.iana.org/domains/example">More information...</a></p>
|
||||
</div>
|
||||
<script>alert('welcome!');</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,9 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Hi</title>
|
||||
</head>
|
||||
<body class="bar">
|
||||
<h1 id="title">Bar</h1>
|
||||
<p>Story about <strong>bar</strong>.</p>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,9 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Hi!</title>
|
||||
</head>
|
||||
<body class="foo">
|
||||
<h1>Foo</h1>
|
||||
<p>Story about foo.</p>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1 @@
|
||||
../tree-sitter-html/queries/highlights.scm
|
||||
@ -0,0 +1 @@
|
||||
tree-sitter-html/src
|
||||
Loading…
Reference in New Issue