A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/observablehq/framework/issues/32 below:

Support inline expressions for attributes (and in other places) · Issue #32 · observablehq/framework · GitHub

Currently inline expression ${…} are only supported for node content. So you can’t do this:

```js
const link = "https://example.com";
```
This is a <a href=${link}>link</a>.

You can workaround it using Hypertext Literal like so:

```js
const link = "https://example.com";
```
This is a ${htl.html`<a href=${link}>link</a>`}.

I’m not immediately sure how we would support this. It might involve writing our own Markdown parser? Or at least pre-processing the content to remove the live code expressions before passing it to markdown-it? Presumably we could repurpose parts of Hypertext Literal to parse the HTML.

mootari, tophtucker, mythmon, yurivish, jm-rivera and 1 more


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4