PageSourceSearch

https://touying-typ.github.io/assets/js/59066d4b.ceb5c3ad.js

js touying-typ.github.io collected 2026-10-03 10:08:15 UTC 3,351 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6034],{72507:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>l,frontMatter:()=>s,metadata:()=>a,toc:()=>d});var i=n(85893),r=n(11151);const s={sidebar_position:21,description:"Convert a heading with label to a short display form.",toc_max_heading_level:2},o="short-heading",a={id:"reference/utils/short-heading",title:"short-heading",description:"Convert a heading with label to a short display form.",source:"@site/docs/reference/utils/short-heading.mdx",sourceDirName:"reference/utils",slug:"/reference/utils/short-heading",permalink:"/docs/reference/utils/short-heading",draft:!1,unlisted:!1,tags:[],version:"current",sidebarPosition:21,frontMatter:{sidebar_position:21,description:"Convert a heading with label to a short display form.",toc_max_heading_level:2},sidebar:"tutorialSidebar",previous:{title:"titlecase",permalink:"/docs/reference/utils/titlecase"},next:{title:"current-heading",permalink:"/docs/reference/utils/current-heading"}},c={},d=[{value:"it : <TypeLink></TypeLink>",id:"it",level:3}];function h(e){const t={a:"a",code:"code",h1:"h1",h3:"h3",p:"p",strong:"strong",...(0,r.a)(),...e.components},{Param:n,Parameters:s,Signature:o,SignatureName:a,SignatureParam:c,SourceLink:d,TypeLink:h}=t;return n||u("Param",!0),s||u("Parameters",!0),o||u("Signature",!0),a||u("SignatureName",!0),c||u("SignatureParam",!0),d||u("SourceLink",!0),h||u("TypeLink",!0),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h1,{id:"short-heading",children:"short-heading"}),"\n",(0,i.jsx)(o,{children:(0,i.jsxs)("code",{children:[(0,i.jsx)(a,{children:"short-heading"}),"(",(0,i.jsxs)(c,{children:[(0,i.jsx)(t.a,{href:"#self",children:"self: none"}),", "]}),(0,i.jsx)(c,{children:(0,i.jsx)(t.a,{href:"#it",children:"it"})}),")",(0,i.jsx)(d,{href:"https://github.com/touying-typ/touying/blob/main/src/utils.typ#L494"})]})}),"\n",(0,i.jsx)(t.p,{children:"Convert a heading with label to a short display form."}),"\n",(0,i.jsxs)(t.p,{children:["If the heading has a special Touying label (e.g. ",(0,i.jsx)(t.code,{children:"touying:hidden"}),"), returns the heading body as-is.\nIf the heading has a user label (e.g. ",(0,i.jsx)(t.code,{children:"section:my-section"}),"), strips the namespace prefix and applies title case via ",(0,i.jsx)(t.code,{children:"convert-label-to-short-heading"}),"."]}),"\n",(0,i.jsxs)(s,{children:[(0,i.jsxs)(t.h3,{id:"it",children:["it : ",(0,i.jsx)(h,{type:"content"})]}),(0,i.jsx)(n,{children:(0,i.jsx)(t.p,{children:"The heading content element."})})]}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.strong,{children:"Returns:"})," ",(0,i.jsx)(h,{type:"content"})]})]})}function l(e={}){const{wrapper:t}={...(0,r.a)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}function u(e,t){throw new Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},11151:(e,t,n)=>{n.d(t,{Z:()=>a,a:()=>o});var i=n(67294);const r={},s=i.createContext(r);function o(e){const t=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),i.createElement(s.Provider,{value:t},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.