GitbookIO/markup-it

Fails to detect inside of HTML tag

Soreine opened this issue · 0 comments

If the inner text of an HTML tag can be found in the tag attributes itself, then we fail to parse it properly:

<a href="mylink">mylink</a>

yields:

      -          {
      -            "data": {
      -              "html": "<a href=\""
      -            }
      -            "isVoid": true
      -            "kind": "inline"
      -            "nodes": [
      -              {
      -                "kind": "text"
      -                "ranges": [
      -                  {
      -                    "kind": "range"
      -                    "marks": []
      -                    "text": " "
      -                  }
      -                ]
      -              }
      -            ]
      -            "type": "html"
      -          }
      -          {
      -            "kind": "text"
      -            "ranges": [
      -              {
      -                "kind": "range"
      -                "marks": []
      -                "text": "mylink"
      -              }
      -            ]
      -          }