remarkjs / remark-gfm

remark plugin to support GFM (autolink literals, footnotes, strikethrough, tables, tasklists)

Home Page:https://remark.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Header information not parsed for example table

cco3 opened this issue · comments

https://astexplorer.net/#/gist/0a92bbf654aca4fdfb3f139254cf0bad/a1cde03a6021091b767d1771fcbdbcc2b93431a0

I'd expect the cells above the dividing line to be marked as th elements in someway, but I see nothing here.

It is parsed, and is encoded positionally, this is noted in the mdast spec:

https://github.com/syntax-tree/mdast#tablecell

TableCell (Parent) represents a header cell in a Table, if its parent is a head, or a data cell otherwise.

and the reference for head

Head

The head of a node is its first child (if any).

in other words, the first row will always be the header.