Code Monkey home page Code Monkey logo

Comments (4)

tripodsan avatar tripodsan commented on July 19, 2024

progress:
image

image

from helix-markdown-support.

tripodsan avatar tripodsan commented on July 19, 2024

progress:

image

from helix-markdown-support.

tripodsan avatar tripodsan commented on July 19, 2024

parsed grid. probably needs 2 phases...

root[2]
├─0 heading[1]
│   │ depth: 2
│   └─0 text "Large Grid Table"
└─1 gridTable[1]
    └─0 gtHeader[3]
        ├─0 gtRow[3]
        │   ├─0 gtCell[1]
        │   │   └─0 text " A1                                                                                         "
        │   ├─1 gtCell[1]
        │   │   └─0 text " B1                                                           "
        │   └─2 gtCell[1]
        │       └─0 text " ## Lorem ipsum dolor sit amet, consectetur adipiscing elit. "
        ├─1 gtRow[3]
        │   ├─0 gtCell[15]
        │   │   ├─0  text " ## My Heading 1                                                                            "
        │   │   ├─1  text "                                                                                            "
        │   │   ├─2  text " ![](https://hlx.blob.core.windows.net/external/19c0cf25413106c81920d75078ee2ef30a55d52e7)\\ "
        │   │   ├─3  text " Lorem ipsum dolor **sit amet**, consectetur adipiscing elit. Vivamus rhoncus elit nibh,    "
        │   │   ├─4  text " sed vestibulum metus tincidunt a. _Integer_ interdum tempus consectetur. Phasellus         "
        │   │   ├─5  text " tristique auctor tortor, tincidunt semper odio blandit eu. Proin et aliquet est. Curabitur "
        │   │   ├─6  text " ac augue ornare, iaculis sem luctus, feugiat tellus.\\                                      "
        │   │   ├─7  text " 0 1 2 3 4 5 6 7 8 9 0 a b c d e f 0 1 2 3 4 5 6 7 8 9 0 a b c d e f                        "
        │   │   ├─8  text "                                                                                            "
        │   │   ├─9  text "                                                                                            "
        │   │   ├─10 text "                                                                                            "
        │   │   ├─11 text "                                                                                            "
        │   │   ├─12 text "                                                                                            "
        │   │   ├─13 text "                                                                                            "
        │   │   └─14 text "                                                                                            "
        │   ├─1 gtCell[15]
        │   │   ├─0  text " ```js                                                        "
        │   │   ├─1  text " for (const row of this.rows) {                               "
        │   │   ├─2  text "   for (let i = 0; i < row.length; i += 1) {                  "
        │   │   ├─3  text "     let col = cols[i];                                       "
        │   │   ├─4  text "     if (!col) {                                              "
        │   │   ├─5  text "       col = {};                                              "
        │   │   ├─6  text "       cols.push(col);                                        "
        │   │   ├─7  text "     }                                                        "
        │   │   ├─8  text "     const cell = row[i];                                     "
        │   │   ├─9  text "     if (cell.value) {                                        "
        │   │   ├─10 text "       col.size = Math.max(col.size || 0, cell.value.length); "
        │   │   ├─11 text "     }                                                        "
        │   │   ├─12 text "   }                                                          "
        │   │   ├─13 text " }                                                            "
        │   │   └─14 text " ```                                                          "
        │   └─2 gtCell[15]
        │       ├─0  text " > My quote                                                  "
        │       ├─1  text " >                                                           "
        │       ├─2  text " > Lorem ipsum dolor sit amet, consectetur adipiscing elit.  "
        │       ├─3  text " > Vivamus rhoncus elit nibh, sed vestibulum metus tincidunt "
        │       ├─4  text " > a.                                                        "
        │       ├─5  text "                                                             "
        │       ├─6  text " -   item one                                                "
        │       ├─7  text " -   item two                                                "
        │       ├─8  text " -   Lorem ipsum dolor sit amet, consectetur adipiscing      "
        │       ├─9  text "     elit. Vivamus rhoncus elit nibh, sed vestibulum metus   "
        │       ├─10 text "     tincidunt a.                                            "
        │       ├─11 text "                                                             "
        │       ├─12 text "                                                             "
        │       ├─13 text "                                                             "
        │       └─14 text "                                                             "
        └─2 gtRow[3]
            ├─0 gtCell[1]
            │   └─0 text " a3                                                                                         "
            ├─1 gtCell[1]
            │   └─0 text " b3                                                           "
            └─2 gtCell[1]
                └─0 text " c3                                                          "

from helix-markdown-support.

tripodsan avatar tripodsan commented on July 19, 2024

closed with #126

from helix-markdown-support.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.