Skip to content

Commit 5e5e096

Browse files
committed
"Tagged Template Literals" -> "Tagged Templates"
1 parent efdb005 commit 5e5e096

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</h1>
77
</p>
88

9-
`htm` is an implementation of JSX-like syntax in plain JavaScript, using [Tagged Template Literals].
9+
`htm` is an implementation of JSX-like syntax in plain JavaScript, using [Tagged Templates].
1010
It lets your build apps using Preact/React/etc directly in the browser.
1111
JSX can be converted to `htm` with only a few tiny modifications.
1212
Templates are parsed by the browser's HTML parser and cached, achieving minimal overhead.
@@ -37,7 +37,7 @@ Here's some ergonomic features you get for free that aren't present in JSX:
3737

3838
The original goal for `htm` was to create a wrapper around Preact that felt natural for use untranspiled in the browser. I wanted to use Virtual DOM, but I wanted to eschew build tooling and use ES Modules directly.
3939

40-
This meant giving up JSX, and the closest alternative was [Tagged Template Literals]. So, I wrote this library to patch up the differences between the two as much as possible. As it turns out, the technique is framework-agnostic, so it should work great with most Virtual DOM libraries.
40+
This meant giving up JSX, and the closest alternative was [Tagged Templates]. So, I wrote this library to patch up the differences between the two as much as possible. As it turns out, the technique is framework-agnostic, so it should work great with most Virtual DOM libraries.
4141

4242
## Installation
4343

@@ -96,4 +96,4 @@ Here's a working app! It's just an HTML file, there is no build or tooling. You
9696

9797
How nifty is that?
9898

99-
[Tagged Template Literals]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#Tagged_templates
99+
[Tagged Templates]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#Tagged_templates

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "htm",
33
"version": "1.0.0",
4-
"description": "The Tagged Template Literal syntax for Virtual DOM. Only browser-compatible syntax.",
4+
"description": "The Tagged Template syntax for Virtual DOM. Only browser-compatible syntax.",
55
"main": "dist/htm.js",
66
"umd:main": "dist/htm.js",
77
"module": "dist/htm.mjs",
@@ -19,7 +19,8 @@
1919
"repository": "developit/htm",
2020
"keywords": [
2121
"Hyperscript Tagged Markup",
22-
"tagged template literals",
22+
"tagged template",
23+
"template literals",
2324
"html",
2425
"htm",
2526
"preact",

src/htm.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ export default function html(statics) {
2323
return tpl(this, arguments);
2424
}
2525

26-
/** Create a template function given strings from a tagged template literal. */
26+
/** Create a template function given strings from a tagged template. */
2727
function build(statics) {
2828
let str = statics[0], i = 1;
2929
while (i < statics.length) {
3030
str += '$_h[' + i + ']' + statics[i++];
3131
}
32-
// Template literal preprocessing:
32+
// Template string preprocessing:
3333
// - replace <${Foo}> with <c c@=${Foo}>
3434
// - replace <x /> with <x></x>
3535
// - replace <${Foo}>a<//>b with <c c@=${Foo}>a</c>b

0 commit comments

Comments
 (0)