Browse Source

CSV table

pull/36/head
Jure Šorn 5 years ago
parent
commit
9051dacd02
1 changed files with 20 additions and 0 deletions
  1. 20
      web/script_2.js

20
web/script_2.js

@ -143,6 +143,25 @@ const DIAGRAM_8_B =
" └── ValueError <span class='hljs-comment'># When an argument is of right type but inappropriate value.</span>\n" + " └── ValueError <span class='hljs-comment'># When an argument is of right type but inappropriate value.</span>\n" +
" └── UnicodeError <span class='hljs-comment'># Raised when encoding/decoding strings from/to bytes fails.</span>\n"; " └── UnicodeError <span class='hljs-comment'># Raised when encoding/decoding strings from/to bytes fails.</span>\n";
const DIAGRAM_9_A =
'+------------------+---------+-----------+--------------+\n' +
'| | excel | excel_tab | unix_dialect |\n' +
'+------------------+---------+-----------+--------------+\n';
const DIAGRAM_9_B =
"┏━━━━━━━━━━━━━━━━━━┯━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━━━━┓\n" +
"┃ │ excel │ excel_tab │ unix_dialect ┃\n" +
"┠──────────────────┼─────────┼───────────┼──────────────┨\n" +
"┃ delimiter │ ',' │ '\\t' │ ',' ┃\n" +
"┃ quotechar │ '\"' │ '\"' │ '\"' ┃\n" +
"┃ doublequote │ True │ True │ True ┃\n" +
"┃ skipinitialspace │ False │ False │ False ┃\n" +
"┃ lineterminator │ '\\r\\n' │ '\\r\\n' │ '\\n' ┃\n" +
"┃ quoting │ 0 │ 0 │ 1 ┃\n" +
"┃ escapechar │ None │ None │ None ┃\n" +
"┗━━━━━━━━━━━━━━━━━━┷━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━━━━┛\n";
// isFontAvailable: // isFontAvailable:
(function(d){function c(c){b.style.fontFamily=c;e.appendChild(b);f=b.clientWidth;e.removeChild(b);return f}var f,e=d.body,b=d.createElement("span");b.innerHTML=Array(100).join("wi");b.style.cssText=["position:absolute","width:auto","font-size:128px","left:-99999px"].join(" !important;");var g=c("monospace"),h=c("serif"),k=c("sans-serif");window.isFontAvailable=function(b){return g!==c(b+",monospace")||k!==c(b+",sans-serif")||h!==c(b+",serif")}})(document); (function(d){function c(c){b.style.fontFamily=c;e.appendChild(b);f=b.clientWidth;e.removeChild(b);return f}var f,e=d.body,b=d.createElement("span");b.innerHTML=Array(100).join("wi");b.style.cssText=["position:absolute","width:auto","font-size:128px","left:-99999px"].join(" !important;");var g=c("monospace"),h=c("serif"),k=c("sans-serif");window.isFontAvailable=function(b){return g!==c(b+",monospace")||k!==c(b+",sans-serif")||h!==c(b+",serif")}})(document);
@ -155,6 +174,7 @@ if (isFontAvailable('Menlo')) {
$(`code:contains(${DIAGRAM_6_A})`).html(DIAGRAM_6_B); $(`code:contains(${DIAGRAM_6_A})`).html(DIAGRAM_6_B);
$(`code:contains(${DIAGRAM_7_A})`).html(DIAGRAM_7_B); $(`code:contains(${DIAGRAM_7_A})`).html(DIAGRAM_7_B);
$(`code:contains(${DIAGRAM_8_A})`).html(DIAGRAM_8_B); $(`code:contains(${DIAGRAM_8_A})`).html(DIAGRAM_8_B);
$(`code:contains(${DIAGRAM_9_A})`).html(DIAGRAM_9_B);
} }
var isMobile = false; var isMobile = false;

Loading…
Cancel
Save