diff --git a/packages/uniorg-rehype/src/__snapshots__/org-to-hast.spec.ts.snap b/packages/uniorg-rehype/src/__snapshots__/org-to-hast.spec.ts.snap index 1c68cc7..8f5c09b 100644 --- a/packages/uniorg-rehype/src/__snapshots__/org-to-hast.spec.ts.snap +++ b/packages/uniorg-rehype/src/__snapshots__/org-to-hast.spec.ts.snap @@ -408,6 +408,12 @@ printf("%d\\n", *a); `; +exports[`org/org-to-hast statistics cookie 1`] = ` + +

hello [2/3]

+ +`; + exports[`org/org-to-hast subscript 1`] = `

hellothere

diff --git a/packages/uniorg-rehype/src/org-to-hast.spec.ts b/packages/uniorg-rehype/src/org-to-hast.spec.ts index f13da4c..b37b500 100644 --- a/packages/uniorg-rehype/src/org-to-hast.spec.ts +++ b/packages/uniorg-rehype/src/org-to-hast.spec.ts @@ -103,6 +103,8 @@ not exported text ` ); + hastTest('statistics cookie', `* hello [2/3]`); + hastTest( 'useSections', `hello diff --git a/packages/uniorg-rehype/src/org-to-hast.ts b/packages/uniorg-rehype/src/org-to-hast.ts index accaff9..1116837 100644 --- a/packages/uniorg-rehype/src/org-to-hast.ts +++ b/packages/uniorg-rehype/src/org-to-hast.ts @@ -264,6 +264,8 @@ export function orgToHast( ) as Hast[] ); } + case 'statistics-cookie': + return h(org, 'span', { className: 'statistics-cookie' }, org.value); case 'plain-list': if (org.listType === 'unordered') { return h(org, 'ul', {}, toHast(org.children));