tickets
All repositories: gitoria
6.3 KB
// components/markdown.hl — A MARKDOWN TEXT, RENDERED (ticket #6): `Markdown { blocks = … }` with the// blocks of markdown.hl's markdownBlocks (the summary, a comment, a state note). The blocks are// plain data; every character of the source is a TEXT node here and a link's href was checked// by markdown.hl safeHref — no HTML string is ever built (no raw HTML, no scripts, no// `javascript:` links). Headings of the text become h3/h4/h5 (the page owns h1/h2). A table// (mission 013) is <markdown-table><table> with <th>/<td> carrying data-align (left/center/right/'').// The span markup is written out once per block kind: a View has no macros.blocks = []Style {markdownText {display = 'block'// Keep the combinator as a quoted nested key.'> :first-child' {marginTop = '0'}// Keep the combinator as a quoted nested key.'> :last-child' {marginBottom = '0'}p {whiteSpace = 'pre-wrap'margin = '.5rem 0'}h3 {margin = '.9rem 0 .4rem'lineHeight = '1.3'color = 'var(--color-text-strong)'fontSize = '1.15rem'}h4 {margin = '.9rem 0 .4rem'lineHeight = '1.3'color = 'var(--color-text-strong)'fontSize = '1.02rem'}h5 {margin = '.9rem 0 .4rem'lineHeight = '1.3'color = 'var(--color-text-strong)'fontSize = '.95rem'}ul {margin = '.5rem 0'paddingLeft = '1.4rem'listStyleType = 'disc'}ol {margin = '.5rem 0'paddingLeft = '1.4rem'listStyleType = 'decimal'}li {whiteSpace = 'pre-wrap'// Keep the combinator as a quoted nested key.'+ li' {marginTop = '.15rem'}}strong {color = 'var(--color-text-strong)'}a {textDecoration = 'underline'textUnderlineOffset = '.15em'overflowWrap = 'anywhere'}code {font = '.88em/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace'padding = '.05em .3em'color = 'var(--color-text-strong)'background = 'var(--color-background-sunken)'borderRadius = 'var(--radius-small)'}pre {margin = '.5rem 0'padding = '.6rem .7rem'overflowX = 'auto'background = 'var(--color-background-sunken)'borderRadius = 'var(--radius-small)'code {padding = '0'background = 'transparent'whiteSpace = 'pre'}}}markdownTable {display = 'block'maxWidth = '100%'overflowX = 'auto'margin = '.5rem 0'padding = '1px'contain = 'inline-size'table {borderCollapse = 'collapse'}th {padding = '.3rem .6rem'textAlign = 'start'verticalAlign = 'top'minWidth = '2.5rem'overflowWrap = 'normal'wordBreak = 'normal'fontWeight = '700'color = 'var(--color-text-strong)'}td {padding = '.3rem .6rem'textAlign = 'start'verticalAlign = 'top'minWidth = '2.5rem'overflowWrap = 'normal'wordBreak = 'normal'}// Keep the attribute selector; there is no bare form.'[data-align="left"]' {textAlign = 'left'}// Keep the attribute selector; there is no bare form.'[data-align="center"]' {textAlign = 'center'}// Keep the attribute selector; there is no bare form.'[data-align="right"]' {textAlign = 'right'}}}View {markdownText {for (b of blocks) {if (b.isP) { p {for (s of b.spans) {if (s.isText) { s.text }if (s.isStrong) { strong { s.text } }if (s.isEm) { em { s.text } }if (s.isStrongEm) { strong { em { s.text } } }if (s.isCode) { code { s.text } }if (s.isLink) { a { href = s.href rel = "nofollow noopener noreferrer" s.text } }}} }if (b.isH1) { h3 {for (s of b.spans) {if (s.isText) { s.text }if (s.isStrong) { strong { s.text } }if (s.isEm) { em { s.text } }if (s.isStrongEm) { strong { em { s.text } } }if (s.isCode) { code { s.text } }if (s.isLink) { a { href = s.href rel = "nofollow noopener noreferrer" s.text } }}} }if (b.isH2) { h4 {for (s of b.spans) {if (s.isText) { s.text }if (s.isStrong) { strong { s.text } }if (s.isEm) { em { s.text } }if (s.isStrongEm) { strong { em { s.text } } }if (s.isCode) { code { s.text } }if (s.isLink) { a { href = s.href rel = "nofollow noopener noreferrer" s.text } }}} }if (b.isH3) { h5 {for (s of b.spans) {if (s.isText) { s.text }if (s.isStrong) { strong { s.text } }if (s.isEm) { em { s.text } }if (s.isStrongEm) { strong { em { s.text } } }if (s.isCode) { code { s.text } }if (s.isLink) { a { href = s.href rel = "nofollow noopener noreferrer" s.text } }}} }if (b.isUl) { ul {for (it of b.items) { li {for (s of it.spans) {if (s.isText) { s.text }if (s.isStrong) { strong { s.text } }if (s.isEm) { em { s.text } }if (s.isStrongEm) { strong { em { s.text } } }if (s.isCode) { code { s.text } }if (s.isLink) { a { href = s.href rel = "nofollow noopener noreferrer" s.text } }}} }} }if (b.isOl) { ol { start = b.startfor (it of b.items) { li {for (s of it.spans) {if (s.isText) { s.text }if (s.isStrong) { strong { s.text } }if (s.isEm) { em { s.text } }if (s.isStrongEm) { strong { em { s.text } } }if (s.isCode) { code { s.text } }if (s.isLink) { a { href = s.href rel = "nofollow noopener noreferrer" s.text } }}} }} }if (b.isCode) { pre { code { b.code } } }// mission 013: a pipe table, in a box that scrolls sideways when it is wider than the textif (b.isTable) { markdownTable { table {thead { tr {for (c of b.head) { th { "data-align" = c.alignfor (s of c.spans) {if (s.isText) { s.text }if (s.isStrong) { strong { s.text } }if (s.isEm) { em { s.text } }if (s.isStrongEm) { strong { em { s.text } } }if (s.isCode) { code { s.text } }if (s.isLink) { a { href = s.href rel = "nofollow noopener noreferrer" s.text } }}} }} }tbody {for (r of b.rows) { tr {for (c of r.cells) { td { "data-align" = c.alignfor (s of c.spans) {if (s.isText) { s.text }if (s.isStrong) { strong { s.text } }if (s.isEm) { em { s.text } }if (s.isStrongEm) { strong { em { s.text } } }if (s.isCode) { code { s.text } }if (s.isLink) { a { href = s.href rel = "nofollow noopener noreferrer" s.text } }}} }} }}} } }}}}
Branches
Latest commits
- 94d6ca2arecords: D38 startedmre
- 9df09aacmission 029: day38b re-vendor + deploymre
- d2834f65records: #94 backup planmre
- 4467d8cbrecords: #94 purge readymre
- 506a4efdmission 028: #94, identity rulemre
- 78c7f48eRefine mpackdb holdmre
- 3d7d89c8Record mpackdb hold until day38mre
- f1bf7195#51 done; my subscription idmre
- 9870b945status: #51 proof greenmre
- e92173c6log: #51 live push proofmre
- 72d87041log: Hermes push livemre
- 1d69bf7dTickets conductor: park until Hermes pushmre
- 80d8cfd1Tickets conductor: #51 livemre
- 61641dd9Complete subscriptions deployment evidencemre
- c980856cRecord successful subscriptions deployment and live checksmre
- 4b4710adMerge branch 's51-subscriptions'mre
- a731ef7eTickets conductor: S51 reviewed, deploy stepmre
- b487b05aRecord verified direct push protocol handoffmre
- 74e34cc3Verify encrypted push secrets and direct push retry semanticsmre
- a1ac5cd0Push subscription notices directly to signed HyperConductor chat endpointsmre