Skip to content

inline tokenizer, take two #1441

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 7, 2024
Merged

inline tokenizer, take two #1441

merged 4 commits into from
Jun 7, 2024

Conversation

mbostock
Copy link
Member

@mbostock mbostock commented Jun 7, 2024

Re-applies #1425, but without trying to change Markdown tokenization. Inline expressions must still be within blocks, but we at least now parse them correctly within the block.

Fixes #375.
Fixes #396 (by considering it intended).
Fixes #636.

@mbostock mbostock force-pushed the mbostock/inline-tokenizer branch 2 times, most recently from f2f746f to bb64b48 Compare June 7, 2024 02:41
@mbostock mbostock force-pushed the mbostock/inline-tokenizer branch from bb64b48 to 4c2b8e4 Compare June 7, 2024 02:45
@mbostock mbostock force-pushed the mbostock/inline-tokenizer branch from 4c2b8e4 to 668bf7c Compare June 7, 2024 02:53
@mbostock mbostock marked this pull request as ready for review June 7, 2024 02:53
@mbostock mbostock requested a review from Fil June 7, 2024 02:53
@mbostock mbostock enabled auto-merge (squash) June 7, 2024 02:54
@mbostock
Copy link
Member Author

mbostock commented Jun 7, 2024

So this still doesn’t work (by design, because Markdown):

${html`<div>
  ${[1, 2, 3].map((i) => i)}
</div>`}

But you can easily fix it by putting it inside an HTML block:

<div>
  ${html`<div>
    ${[1, 2, 3].map((i) => i)}
  </div>`}
</div>

@mbostock mbostock merged commit b1bb94c into main Jun 7, 2024
4 checks passed
@mbostock mbostock deleted the mbostock/inline-tokenizer branch June 7, 2024 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants