Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
gpt-engineer-app[bot]
2026-04-22 17:37:53 +00:00
co-authored by renee-png
parent 3ed2fbe1c3
commit 7436d1bf18
2 changed files with 6 additions and 15 deletions
+6 -6
View File
@@ -100,13 +100,13 @@ const PaddedParagraph = Paragraph.extend({
...this.parent?.(),
indent: {
default: 0,
parseHTML: (el) => {
parseHTML: (el: HTMLElement) => {
const pl = (el as HTMLElement).style.paddingLeft;
if (!pl) return 0;
const n = parseInt(pl, 10);
return isNaN(n) ? 0 : n;
},
renderHTML: (attrs) => {
renderHTML: (attrs: { indent?: number }) => {
const i = Number(attrs.indent ?? 0);
if (!i) return {};
return { style: `padding-left: ${i}px` };
@@ -114,8 +114,8 @@ const PaddedParagraph = Paragraph.extend({
},
caption: {
default: false,
parseHTML: (el) => (el as HTMLElement).getAttribute("data-caption") === "true",
renderHTML: (attrs) =>
parseHTML: (el: HTMLElement) => (el as HTMLElement).getAttribute("data-caption") === "true",
renderHTML: (attrs: { caption?: boolean }) =>
attrs.caption
? {
"data-caption": "true",
@@ -135,13 +135,13 @@ const PaddedHeading = Heading.extend({
...this.parent?.(),
indent: {
default: 0,
parseHTML: (el) => {
parseHTML: (el: HTMLElement) => {
const pl = (el as HTMLElement).style.paddingLeft;
if (!pl) return 0;
const n = parseInt(pl, 10);
return isNaN(n) ? 0 : n;
},
renderHTML: (attrs) => {
renderHTML: (attrs: { indent?: number }) => {
const i = Number(attrs.indent ?? 0);
if (!i) return {};
return { style: `padding-left: ${i}px` };
-9
View File
@@ -1046,12 +1046,3 @@ const rootRouteChildren: RootRouteChildren = {
export const routeTree = rootRouteImport
._addFileChildren(rootRouteChildren)
._addFileTypes<FileRouteTypes>()
import type { getRouter } from './router.tsx'
import type { createStart } from '@tanstack/react-start'
declare module '@tanstack/react-start' {
interface Register {
ssr: true
router: Awaited<ReturnType<typeof getRouter>>
}
}