lvwerra HF Staff commited on
Commit
b3c44c8
·
verified ·
1 Parent(s): d824870

Deploy msgboard

Browse files
Files changed (1) hide show
  1. src/msgboard/dashboard.html +4 -0
src/msgboard/dashboard.html CHANGED
@@ -303,6 +303,9 @@ body.resizing iframe { pointer-events: none; }
303
  .body.md blockquote { margin: 4px 0; padding: 0 0 0 10px; border-left: 2px solid var(--rule-2); color: var(--ink-2); }
304
  .body.md table { border-collapse: collapse; margin: 6px 0; font-size: 13px; display: block; overflow-x: auto; max-width: 100%; }
305
  .body.md th, .body.md td { border: 1px solid var(--rule-2); padding: 3px 9px; text-align: left; }
 
 
 
306
  .body.md th { background: var(--panel); font-weight: 600; }
307
  .body.md hr { border: 0; border-top: 1px solid var(--rule); margin: 8px 0; }
308
  .body.md del { color: var(--ink-3); }
@@ -1226,6 +1229,7 @@ function addCodeTools(root) {
1226
  }
1227
  function hydrate(root) {
1228
  hydrateBoardImages(root);
 
1229
  addCodeTools(root);
1230
  markScrollingCode(root);
1231
  root.querySelectorAll("[data-pic]").forEach((el) => {
 
303
  .body.md blockquote { margin: 4px 0; padding: 0 0 0 10px; border-left: 2px solid var(--rule-2); color: var(--ink-2); }
304
  .body.md table { border-collapse: collapse; margin: 6px 0; font-size: 13px; display: block; overflow-x: auto; max-width: 100%; }
305
  .body.md th, .body.md td { border: 1px solid var(--rule-2); padding: 3px 9px; text-align: left; }
306
+ /* .body may break words anywhere; in a table that lets the browser squeeze a column to one letter */
307
+ .body.md th, .body.md td { overflow-wrap: break-word; word-break: normal; }
308
+ .body.md td .long-token { overflow-wrap: anywhere; } /* a bare URL alone would widen its column past the screen */
309
  .body.md th { background: var(--panel); font-weight: 600; }
310
  .body.md hr { border: 0; border-top: 1px solid var(--rule); margin: 8px 0; }
311
  .body.md del { color: var(--ink-3); }
 
1229
  }
1230
  function hydrate(root) {
1231
  hydrateBoardImages(root);
1232
+ root.querySelectorAll(".body.md td a, .body.md td code").forEach((el) => { if (/\S{24,}/.test(el.textContent)) el.classList.add("long-token"); });
1233
  addCodeTools(root);
1234
  markScrollingCode(root);
1235
  root.querySelectorAll("[data-pic]").forEach((el) => {