gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit12f2f4fe12f2f4fegitoria: re-vendor Hybriel set-day27b, a startup fault in on Error exits 1mre12f2f4fe/components/markdown.hl

4.1 KB

  1. // components/markdown.hl — A MARKDOWN TEXT, RENDERED (as tickets.worldapi.org components/markdown.hl,
  2. // for the repo homepage gitoria#8): `Markdown { blocks = … }` with the blocks of markdown.hl's
  3. // markdownBlocks. The blocks are plain data; every character of the source is a TEXT node here and a
  4. // link's href was checked by markdown.hl safeHref — no HTML string is ever built (no raw HTML, no
  5. // scripts, no `javascript:` links). The page owns h1 (the repo name): a README's `#` is an h2, `##`
  6. // an h3, deeper an h4. The span markup is written out once per block kind: a View has no macros.
  7. blocks = []
  8. textHash = ''
  9. cacheKey = textHash
  10. View {
  11. markdownText {
  12. for (b of blocks) {
  13. if (b.isP) { p {
  14. for (s of b.spans) {
  15. if (s.isText) { s.text }
  16. if (s.isStrong) { strong { s.text } }
  17. if (s.isEm) { em { s.text } }
  18. if (s.isStrongEm) { strong { em { s.text } } }
  19. if (s.isCode) { code { s.text } }
  20. if (s.isLink) { a { href = s.href rel = "nofollow noopener noreferrer" s.text } }
  21. }
  22. } }
  23. if (b.isH1) { h2 {
  24. for (s of b.spans) {
  25. if (s.isText) { s.text }
  26. if (s.isStrong) { strong { s.text } }
  27. if (s.isEm) { em { s.text } }
  28. if (s.isStrongEm) { strong { em { s.text } } }
  29. if (s.isCode) { code { s.text } }
  30. if (s.isLink) { a { href = s.href rel = "nofollow noopener noreferrer" s.text } }
  31. }
  32. } }
  33. if (b.isH2) { h3 {
  34. for (s of b.spans) {
  35. if (s.isText) { s.text }
  36. if (s.isStrong) { strong { s.text } }
  37. if (s.isEm) { em { s.text } }
  38. if (s.isStrongEm) { strong { em { s.text } } }
  39. if (s.isCode) { code { s.text } }
  40. if (s.isLink) { a { href = s.href rel = "nofollow noopener noreferrer" s.text } }
  41. }
  42. } }
  43. if (b.isH3) { h4 {
  44. for (s of b.spans) {
  45. if (s.isText) { s.text }
  46. if (s.isStrong) { strong { s.text } }
  47. if (s.isEm) { em { s.text } }
  48. if (s.isStrongEm) { strong { em { s.text } } }
  49. if (s.isCode) { code { s.text } }
  50. if (s.isLink) { a { href = s.href rel = "nofollow noopener noreferrer" s.text } }
  51. }
  52. } }
  53. if (b.isQuote) { blockquote {
  54. for (s of b.spans) {
  55. if (s.isText) { s.text }
  56. if (s.isStrong) { strong { s.text } }
  57. if (s.isEm) { em { s.text } }
  58. if (s.isStrongEm) { strong { em { s.text } } }
  59. if (s.isCode) { code { s.text } }
  60. if (s.isLink) { a { href = s.href rel = "nofollow noopener noreferrer" s.text } }
  61. }
  62. } }
  63. if (b.isUl) { ul {
  64. for (it of b.items) { li {
  65. for (s of it.spans) {
  66. if (s.isText) { s.text }
  67. if (s.isStrong) { strong { s.text } }
  68. if (s.isEm) { em { s.text } }
  69. if (s.isStrongEm) { strong { em { s.text } } }
  70. if (s.isCode) { code { s.text } }
  71. if (s.isLink) { a { href = s.href rel = "nofollow noopener noreferrer" s.text } }
  72. }
  73. } }
  74. } }
  75. if (b.isOl) { ol { start = b.start
  76. for (it of b.items) { li {
  77. for (s of it.spans) {
  78. if (s.isText) { s.text }
  79. if (s.isStrong) { strong { s.text } }
  80. if (s.isEm) { em { s.text } }
  81. if (s.isStrongEm) { strong { em { s.text } } }
  82. if (s.isCode) { code { s.text } }
  83. if (s.isLink) { a { href = s.href rel = "nofollow noopener noreferrer" s.text } }
  84. }
  85. } }
  86. } }
  87. if (b.isCode) { pre { code { b.code } } }
  88. if (b.isHr) { hr { } }
  89. if (b.isTable) { tableScroll { table {
  90. thead { tr {
  91. for (c of b.head) { th {
  92. for (s of c.spans) {
  93. if (s.isText) { s.text }
  94. if (s.isStrong) { strong { s.text } }
  95. if (s.isEm) { em { s.text } }
  96. if (s.isStrongEm) { strong { em { s.text } } }
  97. if (s.isCode) { code { s.text } }
  98. if (s.isLink) { a { href = s.href rel = "nofollow noopener noreferrer" s.text } }
  99. }
  100. } }
  101. } }
  102. tbody {
  103. for (r of b.rows) { tr {
  104. for (c of r) { td {
  105. for (s of c.spans) {
  106. if (s.isText) { s.text }
  107. if (s.isStrong) { strong { s.text } }
  108. if (s.isEm) { em { s.text } }
  109. if (s.isStrongEm) { strong { em { s.text } } }
  110. if (s.isCode) { code { s.text } }
  111. if (s.isLink) { a { href = s.href rel = "nofollow noopener noreferrer" s.text } }
  112. }
  113. } }
  114. } }
  115. }
  116. } } }
  117. }
  118. }
  119. }

Branches

Latest commits

  • 12f2f4fegitoria: re-vendor Hybriel set-day27b, a startup fault in on Error exits 1mre
  • c21c084egitoria: write the standby service out in full so the boot gate can read the main servicemre
  • e307d69agitoria: say what is per process during the hand-overmre
  • f0cbe6a6gitoria: standby service on port 45014 and a deploy that hands over through it without a gapmre
  • 727cd083gitoria#25: README: vendor notes for Hybriel c1b1010f and the page cachemre
  • 61b72dedgitoria#25: re-vendor Hybriel master c1b1010f (W149 page cache), key the repo Readme page by slug and main commit, extend the readme-cache gatemre
  • 5b0b4b9ereadme-cache gate: use the security gate's ports when no own ports are givenmre
  • bc8f20d9gitoria#25: re-vendor Hybriel c09538bb with the W141 render cache, cache the homepage per commit, add the readme-cache gatemre
  • 9feebbd3Re-vendor Hybriel to ded47c13 (W145: Firefox start script fix)mre
  • 28ed41e5gitoria#24: one sign-in comes from hl:web batch 20, the /session/share workaround is gonemre
  • 3b2669e4gs: drop the unbuildable legacy check, fix pwa fetchmre
  • 2a2fdd77gs: C2 check before cookie experimentsmre
  • 76e0587aWIP gs 2mre
  • a80da7bdWIP gs: security gate for lazy sessions, g24 browser checksmre
  • 23fb05d8re-vendor Hybriel aaa39e69 (hl:web batch 20: login emit and Sessions.mint, tab follows a login, signed-in session cookie wins among duplicates and is re-issued with the Domain, W85 faster render, lazy sessions)mre
  • a0727ca3ident#31: the selector's sign-in returns to the page the user started on (return attribute = the login callback with next), gate checkmre
  • a06975f9gitoria: a gap between your name and Log out in the phone header (they touched); gate checks itmre
  • 32ba9d59gitoria: leave the host-only cookie experiment out of the browser gate (gitoria#24 is a separate mission)mre
  • 43ad2bcfgitoria header: the selector alone plus your name and Log out as before the theme missions; tests follow (WIP: host-only cookie experiment fails)mre
  • ac2c4e3fident selector back in the header (creator 2026-10-24): selector top right signed in and out on phone and desktop, no second Log in button, new gate checks (WIP: gates not re-run after the last edits)mre