diff --git a/README.md b/README.md index 16edb79..1b422aa 100644 --- a/README.md +++ b/README.md @@ -212,25 +212,40 @@ Press **Create Table** to get something like: |} ``` +### ASCII table (inside Github code block) + +```` +``` ++----------------------------------+---------+------------------------+----------------+ +| Col1 | Col2 | Col3 | Numeric Column | ++----------------------------------+---------+------------------------+----------------+ +| Value 1 | Value 2 | 123 | 10.0 | +| Separate | cols | with a tab or 4 spaces | -2,027.1 | +| This is a row with only one cell | | | | ++----------------------------------+---------+------------------------+----------------+ +``` +```` + ### Or even a boring html <table> Leading characters can be added by selecting a comment style: -| Style | Characters | Usage | -|-------------|----------------------------------|--------------------------------------| -| none | "" | no comment style applied | -| doubleslant | "// " | C++/C#/F#/Java/JavaScript/Rust/Swift | -| hash | "# " | Perl/PowerShell/Python/R/Ruby | -| doubledash | "-- " | ada/AppleScript/Haskell/Lua/SQL | -| percent | "% " | MATLAB | -| singlespace | " " (1 space) | MediaWiki | -| quadspace | "    " (4 spaces) | reddit | -| singlequote | "' " (single quote) | VBA | -| rem | "REM " | BASIC/DOS batch file | -| c | "C " | Fortran IV | -| exclamation | "! " | Fortran 90 | -| slantsplat | "/* ... */ " | CSS | -| xml | "<!-- ... -->" | XML | +| Style | Characters | Usage | +|-------------------|----------------------------------|--------------------------------------| +| none | "" | no comment style applied | +| doubleslant | "// " | C++/C#/F#/Java/JavaScript/Rust/Swift | +| hash | "# " | Perl/PowerShell/Python/R/Ruby | +| doubledash | "-- " | ada/AppleScript/Haskell/Lua/SQL | +| percent | "% " | MATLAB | +| singlespace | " " (1 space) | MediaWiki | +| quadspace | "    " (4 spaces) | reddit | +| singlequote | "' " (single quote) | VBA | +| rem | "REM " | BASIC/DOS batch file | +| c | "C " | Fortran IV | +| exclamation | "! " | Fortran 90 | +| slantsplat | "/* ... */ " | CSS | +| xml | "<!-- ... -->" | XML | +| triplebacktick | "```" | Github code block/Whatsapp table | ## License diff --git a/assets/js/script.js b/assets/js/script.js index 28b289f..1a113b0 100644 --- a/assets/js/script.js +++ b/assets/js/script.js @@ -181,6 +181,10 @@ function createTable() { prefix = "|"; suffix = "|"; break; + case "triplebacktick": + commentbefore = "```"; + commentafter = "```"; + break; default: break; } diff --git a/index.html b/index.html index 4f4ca81..329d37f 100644 --- a/index.html +++ b/index.html @@ -110,6 +110,7 @@

Input

+