Skip to content

Comments

feat(core): new structure: inline option for codeToHast#653

Merged
antfu merged 1 commit intomainfrom
feat/structure-inline
Apr 9, 2024
Merged

feat(core): new structure: inline option for codeToHast#653
antfu merged 1 commit intomainfrom
feat/structure-inline

Conversation

@antfu
Copy link
Member

@antfu antfu commented Apr 9, 2024

This PR introduces a new option, structure that takes classic or inline to generate different HAST structures. inline allows to generate <span> and <br> elements without wrapper, for easier embedding.

When using inline, only token and roothook in the transformer will be called.

@netlify
Copy link

netlify bot commented Apr 9, 2024

Deploy Preview for shiki-next ready!

Name Link
🔨 Latest commit 25be7fc
🔍 Latest deploy log https://app.netlify.com/sites/shiki-next/deploys/661568d24f93e8000708e9bd
😎 Deploy Preview https://deploy-preview-653--shiki-next.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Apr 9, 2024

Deploy Preview for shiki-matsu ready!

Name Link
🔨 Latest commit 25be7fc
🔍 Latest deploy log https://app.netlify.com/sites/shiki-matsu/deploys/661568d2db04ca000890b799
😎 Deploy Preview https://deploy-preview-653--shiki-matsu.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@codecov
Copy link

codecov bot commented Apr 9, 2024

Codecov Report

Attention: Patch coverage is 98.33333% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 96.36%. Comparing base (71257dd) to head (25be7fc).

Files Patch % Lines
packages/core/src/code-to-hast.ts 96.87% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #653      +/-   ##
==========================================
+ Coverage   96.34%   96.36%   +0.02%     
==========================================
  Files          70       70              
  Lines        5745     5779      +34     
  Branches      761      765       +4     
==========================================
+ Hits         5535     5569      +34     
  Misses        205      205              
  Partials        5        5              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@antfu antfu merged commit ae516ae into main Apr 9, 2024
@antfu antfu deleted the feat/structure-inline branch April 9, 2024 16:17
diegohaz referenced this pull request in ariakit/ariakit Apr 13, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [shiki](https://github.com/shikijs/shiki)
([source](https://github.com/shikijs/shiki/tree/HEAD/packages/shiki))
| [`1.2.0` ->
`1.3.0`](https://renovatebot.com/diffs/npm/shiki/1.2.0/1.3.0) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/shiki/1.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/shiki/1.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/shiki/1.2.0/1.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/shiki/1.2.0/1.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>shikijs/shiki (shiki)</summary>

### [`v1.3.0`](https://github.com/shikijs/shiki/releases/tag/v1.3.0)

[Compare
Source](https://github.com/shikijs/shiki/compare/v1.2.4...v1.3.0)

#####    🚀 Features

- **core**: New `structure: inline` option for `codeToHast`  -  by
[@&#8203;antfu](https://github.com/antfu) in
[https://github.com/shikijs/shiki/issues/653](https://github.com/shikijs/shiki/issues/653)
[<samp>(ae516)</samp>](https://github.com/shikijs/shiki/commit/ae516aec)

#####     [View changes on
GitHub](https://github.com/shikijs/shiki/compare/v1.2.4...v1.3.0)

### [`v1.2.4`](https://github.com/shikijs/shiki/releases/tag/v1.2.4)

[Compare
Source](https://github.com/shikijs/shiki/compare/v1.2.3...v1.2.4)

*No significant changes*

#####     [View changes on
GitHub](https://github.com/shikijs/shiki/compare/v1.2.3...v1.2.4)

### [`v1.2.3`](https://github.com/shikijs/shiki/releases/tag/v1.2.3)

[Compare
Source](https://github.com/shikijs/shiki/compare/v1.2.2...v1.2.3)

#####    🐞 Bug Fixes

- `colorReplacements` also for `bg` and `fg`, close
[#&#8203;641](https://github.com/shikijs/shiki/issues/641)  -  by
[@&#8203;antfu](https://github.com/antfu) in
[https://github.com/shikijs/shiki/issues/641](https://github.com/shikijs/shiki/issues/641)
[<samp>(bb47a)</samp>](https://github.com/shikijs/shiki/commit/bb47a846)

#####     [View changes on
GitHub](https://github.com/shikijs/shiki/compare/v1.2.2...v1.2.3)

### [`v1.2.2`](https://github.com/shikijs/shiki/releases/tag/v1.2.2)

[Compare
Source](https://github.com/shikijs/shiki/compare/v1.2.1...v1.2.2)

#####    🚀 Features

- Update deps, new `tsv` grammar  -  by
[@&#8203;antfu](https://github.com/antfu)
[<samp>(a7ca7)</samp>](https://github.com/shikijs/shiki/commit/a7ca7c32)

#####    🐞 Bug Fixes

- **monaco**: Typo on interface  -  by
[@&#8203;ije](https://github.com/ije) in
[https://github.com/shikijs/shiki/issues/644](https://github.com/shikijs/shiki/issues/644)
[<samp>(1fc70)</samp>](https://github.com/shikijs/shiki/commit/1fc70bd3)

#####    🏎 Performance

- **shiki-monaco**: Improve tokenizer performance  -  by
[@&#8203;ije](https://github.com/ije) in
[https://github.com/shikijs/shiki/issues/645](https://github.com/shikijs/shiki/issues/645)
[<samp>(069e0)</samp>](https://github.com/shikijs/shiki/commit/069e0be7)

#####     [View changes on
GitHub](https://github.com/shikijs/shiki/compare/v1.2.1...v1.2.2)

### [`v1.2.1`](https://github.com/shikijs/shiki/releases/tag/v1.2.1)

[Compare
Source](https://github.com/shikijs/shiki/compare/v1.2.0...v1.2.1)

#####    🐞 Bug Fixes

- **vitepress-twoslash**: Pass `options.twoslashOptions` to
`createTwoslasher`  -  by
[@&#8203;sapphi-red](https://github.com/sapphi-red) in
[https://github.com/shikijs/shiki/issues/637](https://github.com/shikijs/shiki/issues/637)
[<samp>(75832)</samp>](https://github.com/shikijs/shiki/commit/75832e13)

#####     [View changes on
GitHub](https://github.com/shikijs/shiki/compare/v1.2.0...v1.2.1)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/ariakit/ariakit).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant