From 9051dacd023682bda02a01f5985aee83d09fb5a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Wed, 10 Jul 2019 00:40:51 +0200 Subject: [PATCH] CSV table --- web/script_2.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/web/script_2.js b/web/script_2.js index d0d185e..db8cd85 100644 --- a/web/script_2.js +++ b/web/script_2.js @@ -143,6 +143,25 @@ const DIAGRAM_8_B = " └── ValueError # When an argument is of right type but inappropriate value.\n" + " └── UnicodeError # Raised when encoding/decoding strings from/to bytes fails.\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: (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_7_A})`).html(DIAGRAM_7_B); $(`code:contains(${DIAGRAM_8_A})`).html(DIAGRAM_8_B); + $(`code:contains(${DIAGRAM_9_A})`).html(DIAGRAM_9_B); } var isMobile = false;