-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
feat: Added support for code blocks syntax highlighting #375
feat: Added support for code blocks syntax highlighting #375
Conversation
@ankuragrwl is attempting to deploy a commit to the Dub Team on Vercel. A member of the Team first needs to authorize it. |
const lowlight = createLowlight(common); | ||
lowlight.register("html", html); | ||
lowlight.register("css", css); | ||
lowlight.register("js", js); | ||
lowlight.register("ts", ts); | ||
|
||
const codeBlockLowlight = CodeBlockLowlight.configure({ | ||
lowlight, | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, I've been looking at implementing this feature!
I think this would need a way to specify languages via configuration, since this block basically just hardcodes these 4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related: #369
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have updated the PR.
Simplified the language support and removed the hardcoded ones.
Refer: https://github.com/wooorm/lowlight?tab=readme-ov-file#common
createLowlight(common)
would cover 37 languages by default, which should be good enough for most of the use cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have updated the PR.
Simplified the language support and removed the hardcoded ones. Also removed the usage of highlight.js in the default configuration of the extension.
Refer: https://github.com/wooorm/lowlight?tab=readme-ov-file#common
createLowlight(common)
would cover 37 languages by default, which should be good enough for most of the use cases.
When I was looking into this feature, I found some weird highlight.js bugs with streaming, so worth testing that |
Removed usage of highlight.js as defaut configuration already supports 37 most common languages |
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@headlessui/react](https://togithub.com/tailwindlabs/headlessui) ([source](https://togithub.com/tailwindlabs/headlessui/tree/HEAD/packages/@headlessui-react)) | [`2.0.3` -> `2.0.4`](https://renovatebot.com/diffs/npm/@headlessui%2freact/2.0.3/2.0.4) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@headlessui%2freact/2.0.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@headlessui%2freact/2.0.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@headlessui%2freact/2.0.3/2.0.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@headlessui%2freact/2.0.3/2.0.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@types/node](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node) ([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node)) | [`20.12.11` -> `20.12.12`](https://renovatebot.com/diffs/npm/@types%2fnode/20.12.11/20.12.12) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2fnode/20.12.12?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2fnode/20.12.12?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2fnode/20.12.11/20.12.12?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2fnode/20.12.11/20.12.12?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@types/react](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react) ([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react)) | [`18.3.2` -> `18.3.3`](https://renovatebot.com/diffs/npm/@types%2freact/18.3.2/18.3.3) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2freact/18.3.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2freact/18.3.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2freact/18.3.2/18.3.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2freact/18.3.2/18.3.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [ai](https://sdk.vercel.ai/docs) ([source](https://togithub.com/vercel/ai)) | [`3.1.5` -> `3.1.17`](https://renovatebot.com/diffs/npm/ai/3.1.5/3.1.17) | [![age](https://developer.mend.io/api/mc/badges/age/npm/ai/3.1.17?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/ai/3.1.17?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/ai/3.1.5/3.1.17?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/ai/3.1.5/3.1.17?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [novel](https://novel.sh) ([source](https://togithub.com/steven-tey/novel)) | [`^0.3.0` -> `^0.4.0`](https://renovatebot.com/diffs/npm/novel/0.3.1/0.4.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/novel/0.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/novel/0.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/novel/0.3.1/0.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/novel/0.3.1/0.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [openai](https://togithub.com/openai/openai-python) | `1.28.1` -> `1.30.4` | [![age](https://developer.mend.io/api/mc/badges/age/pypi/openai/1.30.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/openai/1.30.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/openai/1.28.1/1.30.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/openai/1.28.1/1.30.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [openai](https://togithub.com/openai/openai-python) | `1.30.3` -> `1.30.4` | [![age](https://developer.mend.io/api/mc/badges/age/pypi/openai/1.30.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/openai/1.30.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/openai/1.30.3/1.30.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/openai/1.30.3/1.30.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [openai](https://togithub.com/openai/openai-python) | `1.30.2` -> `1.30.4` | [![age](https://developer.mend.io/api/mc/badges/age/pypi/openai/1.30.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/openai/1.30.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/openai/1.30.2/1.30.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/openai/1.30.2/1.30.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [openai](https://togithub.com/openai/openai-python) | `1.30.1` -> `1.30.4` | [![age](https://developer.mend.io/api/mc/badges/age/pypi/openai/1.30.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/openai/1.30.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/openai/1.30.1/1.30.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/openai/1.30.1/1.30.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [openai](https://togithub.com/openai/openai-node) | [`4.45.0` -> `4.47.2`](https://renovatebot.com/diffs/npm/openai/4.45.0/4.47.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/openai/4.47.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/openai/4.47.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/openai/4.45.0/4.47.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/openai/4.45.0/4.47.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [pydantic](https://togithub.com/pydantic/pydantic) ([changelog](https://docs.pydantic.dev/latest/changelog/)) | `2.7.1` -> `2.7.2` | [![age](https://developer.mend.io/api/mc/badges/age/pypi/pydantic/2.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/pydantic/2.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/pydantic/2.7.1/2.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/pydantic/2.7.1/2.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [tsx](https://togithub.com/privatenumber/tsx) | [`4.10.2` -> `4.11.0`](https://renovatebot.com/diffs/npm/tsx/4.10.2/4.11.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/tsx/4.11.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/tsx/4.11.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/tsx/4.10.2/4.11.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/tsx/4.10.2/4.11.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>tailwindlabs/headlessui (@​headlessui/react)</summary> ### [`v2.0.4`](https://togithub.com/tailwindlabs/headlessui/blob/HEAD/packages/@​headlessui-react/CHANGELOG.md#204---2024-05-25) [Compare Source](https://togithub.com/tailwindlabs/headlessui/compare/@headlessui/react@v2.0.3...@headlessui/react@v2.0.4) ##### Fixed - \[internal] Don’t set a focus fallback for Dialog’s in demo mode ([#​3194](https://togithub.com/tailwindlabs/headlessui/pull/3194)) - Ensure page doesn't scroll down when pressing `Escape` to close the `Dialog` component ([#​3218](https://togithub.com/tailwindlabs/headlessui/pull/3218)) - Fix crash when toggling between `virtual` and non-virtual mode in `Combobox` component ([#​3236](https://togithub.com/tailwindlabs/headlessui/pull/3236)) - Ensure tabbing to a portalled `<PopoverPanel>` component moves focus inside (without using `<PortalGroup>`) ([#​3239](https://togithub.com/tailwindlabs/headlessui/pull/3239)) - Only handle form reset when `defaultValue` is used ([#​3240](https://togithub.com/tailwindlabs/headlessui/pull/3240)) ##### Deprecated - Mark `SwitchGroup` as deprecated, prefer `Field` instead ([#​3232](https://togithub.com/tailwindlabs/headlessui/pull/3232)) ##### Changed - Use native `fieldset` instead of `div` by default for `<Fieldset />` component ([#​3237](https://togithub.com/tailwindlabs/headlessui/pull/3237)) </details> <details> <summary>vercel/ai (ai)</summary> ### [`v3.1.17`](https://togithub.com/vercel/ai/releases/tag/ai%403.1.17) ##### Patch Changes - [`92b993b`](https://togithub.com/vercel/ai/commit/92b993b7): ai/rsc: improve getAIState and getMutableAIState types - [`7de628e`](https://togithub.com/vercel/ai/commit/7de628e9): chore (ui): deprecate old function/tool call handling - [`7de628e`](https://togithub.com/vercel/ai/commit/7de628e9): feat (ui): add onToolCall handler to useChat ### [`v3.1.16`](https://togithub.com/vercel/ai/releases/tag/ai%403.1.16) [Compare Source](https://togithub.com/vercel/ai/compare/ai@3.1.15...ai@3.1.16) ##### Patch Changes - [`f39c0dd`](https://togithub.com/vercel/ai/commit/f39c0dd2): feat (core, rsc): add toolChoice setting - Updated dependencies \[[`f39c0dd`](https://togithub.com/vercel/ai/commit/f39c0dd2)] - [@​ai-sdk/provider](https://togithub.com/ai-sdk/provider)[@​0](https://togithub.com/0).0.8 - [@​ai-sdk/provider-utils](https://togithub.com/ai-sdk/provider-utils)[@​0](https://togithub.com/0).0.11 ### [`v3.1.15`](https://togithub.com/vercel/ai/releases/tag/ai%403.1.15) [Compare Source](https://togithub.com/vercel/ai/compare/ai@3.1.14...ai@3.1.15) ##### Patch Changes - [`8e78028`](https://togithub.com/vercel/ai/commit/8e780288): feat (ai/core): add onFinish callback to streamText - [`8e78028`](https://togithub.com/vercel/ai/commit/8e780288): feat (ai/core): add text, toolCalls, and toolResults promises to StreamTextResult (matching the generateText result API with async methods) - Updated dependencies \[[`8e78028`](https://togithub.com/vercel/ai/commit/8e780288)] - [@​ai-sdk/provider](https://togithub.com/ai-sdk/provider)[@​0](https://togithub.com/0).0.7 - [@​ai-sdk/provider-utils](https://togithub.com/ai-sdk/provider-utils)[@​0](https://togithub.com/0).0.10 ### [`v3.1.14`](https://togithub.com/vercel/ai/releases/tag/ai%403.1.14) [Compare Source](https://togithub.com/vercel/ai/compare/ai@3.1.13...ai@3.1.14) ##### Patch Changes - [`6109c6a`](https://togithub.com/vercel/ai/commit/6109c6a): feat (ai/react): add experimental_maxAutomaticRoundtrips to useChat ### [`v3.1.13`](https://togithub.com/vercel/ai/releases/tag/ai%403.1.13) [Compare Source](https://togithub.com/vercel/ai/compare/ai@3.1.12...ai@3.1.13) ##### Patch Changes - [`60117c9`](https://togithub.com/vercel/ai/commit/60117c9): dependencies (ai/ui): add React 18.3 and 19 support (peer dependency) - Updated dependencies \[[`6a50ac4`](https://togithub.com/vercel/ai/commit/6a50ac4)] - Updated dependencies \[[`6a50ac4`](https://togithub.com/vercel/ai/commit/6a50ac4)] - [@​ai-sdk/provider](https://togithub.com/ai-sdk/provider)[@​0](https://togithub.com/0).0.6 - [@​ai-sdk/provider-utils](https://togithub.com/ai-sdk/provider-utils)[@​0](https://togithub.com/0).0.9 ### [`v3.1.12`](https://togithub.com/vercel/ai/releases/tag/ai%403.1.12) [Compare Source](https://togithub.com/vercel/ai/compare/ai@3.1.11...ai@3.1.12) ##### Patch Changes - [`ae05fb7`](https://togithub.com/vercel/ai/commit/ae05fb7): feat (ai/streams): add StreamData support to streamToResponse ### [`v3.1.11`](https://togithub.com/vercel/ai/releases/tag/ai%403.1.11) [Compare Source](https://togithub.com/vercel/ai/compare/ai@3.1.10...ai@3.1.11) ##### Patch Changes - [`a085d42`](https://togithub.com/vercel/ai/commit/a085d42): fix (ai/ui): decouple StreamData chunks from LLM stream ### [`v3.1.10`](https://togithub.com/vercel/ai/releases/tag/ai%403.1.10) [Compare Source](https://togithub.com/vercel/ai/compare/ai@3.1.9...ai@3.1.10) ##### Patch Changes - [`3a21030`](https://togithub.com/vercel/ai/commit/3a21030): feat (ai/core): add embedMany function ### [`v3.1.9`](https://togithub.com/vercel/ai/releases/tag/ai%403.1.9) [Compare Source](https://togithub.com/vercel/ai/compare/ai@3.1.8...ai@3.1.9) ##### Patch Changes - [`18a9655`](https://togithub.com/vercel/ai/commit/18a9655): feat (ai/svelte): add useAssistant ### [`v3.1.8`](https://togithub.com/vercel/ai/releases/tag/ai%403.1.8) [Compare Source](https://togithub.com/vercel/ai/compare/ai@3.1.7...ai@3.1.8) ##### Patch Changes - [`0f6bc4e`](https://togithub.com/vercel/ai/commit/0f6bc4e): feat (ai/core): add embed function - Updated dependencies \[[`0f6bc4e`](https://togithub.com/vercel/ai/commit/0f6bc4e)] - [@​ai-sdk/provider](https://togithub.com/ai-sdk/provider)[@​0](https://togithub.com/0).0.5 - [@​ai-sdk/provider-utils](https://togithub.com/ai-sdk/provider-utils)[@​0](https://togithub.com/0).0.8 ### [`v3.1.7`](https://togithub.com/vercel/ai/releases/tag/ai%403.1.7) [Compare Source](https://togithub.com/vercel/ai/compare/ai@3.1.6...ai@3.1.7) ##### Patch Changes - [`f617b97`](https://togithub.com/vercel/ai/commit/f617b97): feat (ai): support client/server tool calls with useChat and streamText ### [`v3.1.6`](https://togithub.com/vercel/ai/releases/tag/ai%403.1.6) [Compare Source](https://togithub.com/vercel/ai/compare/ai@3.1.5...ai@3.1.6) ##### Patch Changes - [`2e78acb`](https://togithub.com/vercel/ai/commit/2e78acb): Deprecate StreamingReactResponse (use AI SDK RSC instead). - [`8439884`](https://togithub.com/vercel/ai/commit/8439884): ai/rsc: make RSC streamable utils chainable - [`325ca55`](https://togithub.com/vercel/ai/commit/325ca55): feat (ai/core): improve image content part error message - Updated dependencies \[[`325ca55`](https://togithub.com/vercel/ai/commit/325ca55)] - [@​ai-sdk/provider](https://togithub.com/ai-sdk/provider)[@​0](https://togithub.com/0).0.4 - [@​ai-sdk/provider-utils](https://togithub.com/ai-sdk/provider-utils)[@​0](https://togithub.com/0).0.7 </details> <details> <summary>steven-tey/novel (novel)</summary> ### [`v0.4.2`](https://togithub.com/steven-tey/novel/releases/tag/novel%400.4.2) [Compare Source](https://togithub.com/steven-tey/novel/compare/novel@0.4.1...novel@0.4.2) #### What's Changed - fix: codeblock-lowlight doesn't render in html output by [@​MODSetter](https://togithub.com/MODSetter) in [steven-tey/novel#395 - bump tiptap-extension-global-drag-handle to latest **Full Changelog**: https://github.com/steven-tey/novel/compare/novel@0.4.1...novel@0.4.2 ### [`v0.4.1`](https://togithub.com/steven-tey/novel/releases/tag/novel%400.4.1) [Compare Source](https://togithub.com/steven-tey/novel/compare/novel@0.4.0...novel@0.4.1) #### Breaking Changes - getPrevText is now exported from novel/utils ```diff - import { getPrevText } from "novel/extensions"; + import { getPrevText } from "novel/utils"; ``` - drag handle has to be explicitly added to the extension array ```diff + import { GlobalDragHandle } from "novel/extensions"; const extensions = [..., GlobalDragHandle] ``` #### What's Changed - migrated eslint/prettier to biome - [#​370](https://togithub.com/steven-tey/novel/issues/370)-fix-cannot-remove-a-selected-link-in-the-bubble-menu by [@​code-sharad](https://togithub.com/code-sharad) in [steven-tey/novel#374 - feat: Added support for code blocks syntax highlighting by [@​ankuragrwl](https://togithub.com/ankuragrwl) in [steven-tey/novel#375 - feat: Basic YT Embeds + CharCount Support by [@​MODSetter](https://togithub.com/MODSetter) in [steven-tey/novel#386 - Image is deleted if an error occurs by [@​hernancito](https://togithub.com/hernancito) in [steven-tey/novel#390 - novel/utils exports a series of utils functions ```ts //returns document content until a give position in doc import { getPrevText} from "novel/utils"; const pos = editor.state.selection.from; const text = getPrevText(editor, pos); //returns document content as markdown string import { getAllContent} from "novel/utils"; ``` #### New Contributors - [@​code-sharad](https://togithub.com/code-sharad) made their first contribution in [steven-tey/novel#374 - [@​ankuragrwl](https://togithub.com/ankuragrwl) made their first contribution in [steven-tey/novel#375 - [@​MODSetter](https://togithub.com/MODSetter) made their first contribution in [steven-tey/novel#386 **Full Changelog**: https://github.com/steven-tey/novel/compare/novel@0.3.1...novel@0.4.1 ### [`v0.4.0`](https://togithub.com/steven-tey/novel/compare/novel@0.3.1...novel@0.4.0) [Compare Source](https://togithub.com/steven-tey/novel/compare/novel@0.3.1...novel@0.4.0) </details> <details> <summary>openai/openai-python (openai)</summary> ### [`v1.30.4`](https://togithub.com/openai/openai-python/blob/HEAD/CHANGELOG.md#1304-2024-05-28) [Compare Source](https://togithub.com/openai/openai-python/compare/v1.30.3...v1.30.4) Full Changelog: [v1.30.3...v1.30.4](https://togithub.com/openai/openai-python/compare/v1.30.3...v1.30.4) ##### Chores - add missing **all** definitions ([7fba60f](https://togithub.com/openai/openai-python/commit/7fba60f2e8adc26e83080aaf3e436eb9891e1253)) - **internal:** fix lint issue ([f423cd0](https://togithub.com/openai/openai-python/commit/f423cd05d33b3e734eda7c0c008faac14ae96bb7)) ### [`v1.30.3`](https://togithub.com/openai/openai-python/blob/HEAD/CHANGELOG.md#1303-2024-05-24) [Compare Source](https://togithub.com/openai/openai-python/compare/v1.30.2...v1.30.3) Full Changelog: [v1.30.2...v1.30.3](https://togithub.com/openai/openai-python/compare/v1.30.2...v1.30.3) ##### Chores - **ci:** update rye install location ([#​1440](https://togithub.com/openai/openai-python/issues/1440)) ([8a0e5bf](https://togithub.com/openai/openai-python/commit/8a0e5bf4c03d9c714799fad43be68ac9c2b1f37a)) - **internal:** bump pyright ([#​1442](https://togithub.com/openai/openai-python/issues/1442)) ([64a151e](https://togithub.com/openai/openai-python/commit/64a151eae705d55484f870df461434c0a6961e2b)) - **internal:** fix lint issue ([#​1444](https://togithub.com/openai/openai-python/issues/1444)) ([b0eb458](https://togithub.com/openai/openai-python/commit/b0eb4582e050b0a25af3d80d2cb584bfc7cd11ab)) ##### Documentation - **contributing:** update references to rye-up.com ([dcc34a2](https://togithub.com/openai/openai-python/commit/dcc34a26d1a6a0debf440724fad658c77547048c)) ### [`v1.30.2`](https://togithub.com/openai/openai-python/blob/HEAD/CHANGELOG.md#1302-2024-05-23) [Compare Source](https://togithub.com/openai/openai-python/compare/v1.30.1...v1.30.2) Full Changelog: [v1.30.1...v1.30.2](https://togithub.com/openai/openai-python/compare/v1.30.1...v1.30.2) ##### Chores - **ci:** update rye install location ([#​1436](https://togithub.com/openai/openai-python/issues/1436)) ([f7cc4e7](https://togithub.com/openai/openai-python/commit/f7cc4e7d5d0964a4a5d53e602379770c2576e1aa)) ### [`v1.30.1`](https://togithub.com/openai/openai-python/blob/HEAD/CHANGELOG.md#1301-2024-05-14) [Compare Source](https://togithub.com/openai/openai-python/compare/v1.30.0...v1.30.1) Full Changelog: [v1.30.0...v1.30.1](https://togithub.com/openai/openai-python/compare/v1.30.0...v1.30.1) ##### Chores - **internal:** add slightly better logging to scripts ([#​1422](https://togithub.com/openai/openai-python/issues/1422)) ([43dffab](https://togithub.com/openai/openai-python/commit/43dffabb3bed4edf8a6e523cbb289f733a5f9b24)) ### [`v1.30.0`](https://togithub.com/openai/openai-python/blob/HEAD/CHANGELOG.md#1300-2024-05-14) [Compare Source](https://togithub.com/openai/openai-python/compare/v1.29.0...v1.30.0) Full Changelog: [v1.29.0...v1.30.0](https://togithub.com/openai/openai-python/compare/v1.29.0...v1.30.0) ##### Features - **api:** add incomplete state ([#​1420](https://togithub.com/openai/openai-python/issues/1420)) ([6484984](https://togithub.com/openai/openai-python/commit/648498412d1c7740e6b67ed4d0a55b89ff29d3b1)) ### [`v1.29.0`](https://togithub.com/openai/openai-python/blob/HEAD/CHANGELOG.md#1290-2024-05-13) [Compare Source](https://togithub.com/openai/openai-python/compare/v1.28.2...v1.29.0) Full Changelog: [v1.28.2...v1.29.0](https://togithub.com/openai/openai-python/compare/v1.28.2...v1.29.0) ##### Features - **api:** add gpt-4o model ([#​1417](https://togithub.com/openai/openai-python/issues/1417)) ([4f09f8c](https://togithub.com/openai/openai-python/commit/4f09f8c6cc4450f5e61f158f1bd54c513063a1a8)) ### [`v1.28.2`](https://togithub.com/openai/openai-python/blob/HEAD/CHANGELOG.md#1282-2024-05-13) [Compare Source](https://togithub.com/openai/openai-python/compare/v1.28.1...v1.28.2) Full Changelog: [v1.28.1...v1.28.2](https://togithub.com/openai/openai-python/compare/v1.28.1...v1.28.2) ##### Bug Fixes - **client:** accidental blocking sleep in async code ([#​1415](https://togithub.com/openai/openai-python/issues/1415)) ([0ac6ecb](https://togithub.com/openai/openai-python/commit/0ac6ecb8d4e52f895bc3ae1f589f22ddaaef6204)) ##### Chores - **internal:** bump pydantic dependency ([#​1413](https://togithub.com/openai/openai-python/issues/1413)) ([ed73d1d](https://togithub.com/openai/openai-python/commit/ed73d1db540714e29a1ba30e3aa6429aae8b1dd8)) </details> <details> <summary>openai/openai-node (openai)</summary> ### [`v4.47.2`](https://togithub.com/openai/openai-node/blob/HEAD/CHANGELOG.md#4472-2024-05-28) [Compare Source](https://togithub.com/openai/openai-node/compare/v4.47.1...v4.47.2) Full Changelog: [v4.47.1...v4.47.2](https://togithub.com/openai/openai-node/compare/v4.47.1...v4.47.2) ##### Documentation - **readme:** add bundle size badge ([#​869](https://togithub.com/openai/openai-node/issues/869)) ([e252132](https://togithub.com/openai/openai-node/commit/e2521327b7b4f5abe97e4c58c417b37d00079ef8)) ### [`v4.47.1`](https://togithub.com/openai/openai-node/blob/HEAD/CHANGELOG.md#4471-2024-05-14) [Compare Source](https://togithub.com/openai/openai-node/compare/v4.47.0...v4.47.1) Full Changelog: [v4.47.0...v4.47.1](https://togithub.com/openai/openai-node/compare/v4.47.0...v4.47.1) ##### Chores - **internal:** add slightly better logging to scripts ([#​848](https://togithub.com/openai/openai-node/issues/848)) ([139e690](https://togithub.com/openai/openai-node/commit/139e690546775b3568934dd990dd329fce2fbc2f)) ### [`v4.47.0`](https://togithub.com/openai/openai-node/blob/HEAD/CHANGELOG.md#4470-2024-05-14) [Compare Source](https://togithub.com/openai/openai-node/compare/v4.46.1...v4.47.0) Full Changelog: [v4.46.1...v4.47.0](https://togithub.com/openai/openai-node/compare/v4.46.1...v4.47.0) ##### Features - **api:** add incomplete state ([#​846](https://togithub.com/openai/openai-node/issues/846)) ([5f663a1](https://togithub.com/openai/openai-node/commit/5f663a167361b905c6d0c1242e8a78037a7e4a57)) ### [`v4.46.1`](https://togithub.com/openai/openai-node/blob/HEAD/CHANGELOG.md#4461-2024-05-13) [Compare Source](https://togithub.com/openai/openai-node/compare/v4.46.0...v4.46.1) Full Changelog: [v4.46.0...v4.46.1](https://togithub.com/openai/openai-node/compare/v4.46.0...v4.46.1) ##### Refactors - change import paths to be relative ([#​843](https://togithub.com/openai/openai-node/issues/843)) ([7913574](https://togithub.com/openai/openai-node/commit/7913574bdb6fcbcf68e56e8def351add6c43310a)) ### [`v4.46.0`](https://togithub.com/openai/openai-node/blob/HEAD/CHANGELOG.md#4460-2024-05-13) [Compare Source](https://togithub.com/openai/openai-node/compare/v4.45.0...v4.46.0) Full Changelog: [v4.45.0...v4.46.0](https://togithub.com/openai/openai-node/compare/v4.45.0...v4.46.0) ##### Features - **api:** add gpt-4o model ([#​841](https://togithub.com/openai/openai-node/issues/841)) ([c818ed1](https://togithub.com/openai/openai-node/commit/c818ed139bfba81af6ca3c4eda08d52366758529)) </details> <details> <summary>pydantic/pydantic (pydantic)</summary> ### [`v2.7.2`](https://togithub.com/pydantic/pydantic/blob/HEAD/HISTORY.md#v272-2024-05-28) [Compare Source](https://togithub.com/pydantic/pydantic/compare/v2.7.1...v2.7.2) [GitHub release](https://togithub.com/pydantic/pydantic/releases/tag/v2.7.2) ##### What's Changed ##### Packaging - Bump `pydantic-core` to `v2.18.3` by [@​sydney-runkle](https://togithub.com/sydney-runkle) in [#​9515](https://togithub.com/pydantic/pydantic/pull/9515) ##### Fixes - Replace `__spec__.parent` with `__package__` by [@​hramezani](https://togithub.com/hramezani) in [#​9331](https://togithub.com/pydantic/pydantic/pull/9331) - Fix validation of `int`s with leading unary minus by [@​RajatRajdeep](https://togithub.com/RajatRajdeep) in [pydantic/pydantic-core#1291](https://togithub.com/pydantic/pydantic-core/pull/1291) - Fix `str` subclass validation for enums by [@​sydney-runkle](https://togithub.com/sydney-runkle) in \[[pydantic/pydantic-core#1273](https://togithub.com/pydantic/pydantic-core/issues/1273)][https://github.com/pydantic/pydantic-core/pull/1273](https://togithub.com/pydantic/pydantic-core/pull/1273) - Support `BigInt`s in `Literal`s and `Enum`s by [@​samuelcolvin](https://togithub.com/samuelcolvin) in \[[pydantic/pydantic-core#1297](https://togithub.com/pydantic/pydantic-core/issues/1297)][https://github.com/pydantic/pydantic-core/pull/1297](https://togithub.com/pydantic/pydantic-core/pull/1297) - Fix: uuid - allow `str` subclass as input by [@​davidhewitt](https://togithub.com/davidhewitt) in \[[pydantic/pydantic-core#1296](https://togithub.com/pydantic/pydantic-core/issues/1296)][https://github.com/pydantic/pydantic-core/pull/1296](https://togithub.com/pydantic/pydantic-core/pull/1296) </details> <details> <summary>privatenumber/tsx (tsx)</summary> ### [`v4.11.0`](https://togithub.com/privatenumber/tsx/releases/tag/v4.11.0) [Compare Source](https://togithub.com/privatenumber/tsx/compare/v4.10.5...v4.11.0) ##### Bug Fixes - only error on invalid tsconfig if explicitly passed in ([#​30](https://togithub.com/privatenumber/tsx/issues/30)) ([b6bf39b](https://togithub.com/privatenumber/tsx/commit/b6bf39b1cc4ca037a16f5b02c619ed5c36e6d598)) ##### Features - **esm api:** configurable `tsconfig` ([3f42ae3](https://togithub.com/privatenumber/tsx/commit/3f42ae3dfc666cd4a6de7376ab051840e18c8c05)) *** This release is also available on: - [npm package (@​latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.11.0) ### [`v4.10.5`](https://togithub.com/privatenumber/tsx/releases/tag/v4.10.5) [Compare Source](https://togithub.com/privatenumber/tsx/compare/v4.10.4...v4.10.5) ##### Bug Fixes - handle parsing variable `of` ([86cf87c](https://togithub.com/privatenumber/tsx/commit/86cf87c861991eddb39cf8ea88b2870b9f536ff5)), closes [#​556](https://togithub.com/privatenumber/tsx/issues/556) *** This release is also available on: - [npm package (@​latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.10.5) ### [`v4.10.4`](https://togithub.com/privatenumber/tsx/compare/v4.10.3...4a8a2dcce25e1223dec65219659065901fd7620f) [Compare Source](https://togithub.com/privatenumber/tsx/compare/v4.10.3...v4.10.4) ### [`v4.10.3`](https://togithub.com/privatenumber/tsx/releases/tag/v4.10.3) [Compare Source](https://togithub.com/privatenumber/tsx/compare/v4.10.2...v4.10.3) ##### Performance Improvements - skip parsing if `import(` is not found in minified code ([5cdd50b](https://togithub.com/privatenumber/tsx/commit/5cdd50bc3fb406c02b9508ea15e33c4f9d597bfb)) *** This release is also available on: - [npm package (@​latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.10.3) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on Monday" in timezone America/Chicago, 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. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- 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/autoblocksai/autoblocks-examples). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNjguMTAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4zNzcuOCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
I have added the support for code syntax highlighting in code-blocks.
Following changes were included:
Added
@tiptap/extension-code-block-lowlight
to headless package. No styling added here to keep it headless.Enhanced the web application and added css styles to globals.css. Configured the lowlight using highlight languages in
extensions.ts
.const lowlight = createLowlight(common); lowlight.register("html", html); lowlight.register("css", css); lowlight.register("js", js); lowlight.register("ts", ts);
const codeBlockLowlight = CodeBlockLowlight.configure({ lowlight, });