# ultrahtml
## 1.6.0
### Minor Changes
- 124e573: Adds a new `transformSync` function, a synchronous alternative to the `transform` function. This can be used when there are no `async` transformer functions.
```js
import { transformSync, html } from "ultrahtml";
import swap from "ultrahtml/transformers/swap";
const output = transformSync(`
```
- f0a1da3: Adds a new `unblockElements` option to the `sanitize` transformer. This option makes it easier to remove all or most HTML from a string without dropping child content.
### Patch Changes
- f0a1da3: Fixes sanitization of nested elements.
For example, the following code:
```js
const output = await transform("
Hello world!
", [
sanitize({ blockElements: ["h1", "strong"] }),
]);
```
produced the following output before this fix:
```html
Hello world!
```
and now correctly produces:
```html
Hello world!
```
- e8aee16: Improve parser performance for attributes
- 8388fe7: Updates internal dependency on `esbuild`
## 1.5.3
### Patch Changes
- ebc97e0: upgrades `dts-bundle-generator` to `9.2.1`, fixing an issue with `.d.ts`
generation which led methods prefixed with two underscores to be
incorrectly made private in the generated declaration file.
## 1.5.2
### Patch Changes
- 244be0a: Update `parsel-js` to latest
## 1.5.1
### Patch Changes
- a989b5a: Bundle type definitions in `.d.ts` files
## 1.5.0
### Minor Changes
- 7c93190: Add support for static media queries to `ultrahtml/transformers/inline`.
You may now pass an `env` value to the transformer, for example:
```js
import { transform } from "ultrahtml";
import inline from "ultrahtml/transformers/inline";
const output = await transform(input, [
// Acts as if the screen is 960px wide and 1280px tall
inline({ env: { width: 960, height: 1280 } }),
]);
```
## 1.4.0
### Minor Changes
- 8bbaeef: Allow elements inside of `