Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table with "<colgroup>" is considered as without header #19

Open
andrey-skl opened this issue Jan 17, 2020 · 4 comments
Open

Table with "<colgroup>" is considered as without header #19

andrey-skl opened this issue Jan 17, 2020 · 4 comments

Comments

@andrey-skl
Copy link

Scenario: try to convert table with colgroup:

<table>
   <colgroup><col /></colgroup>
    <tbody>
        <tr>
            <td>content</td>
        </tr>
         <tr>
            <td>content</td>
        </tr>
    </tbody>
</table>

Expected result: table is converted

Actual result: table kept as is.

This function seems to be adapted to handle this:


function isFirstTbody (element) {
  var previousSibling = element.previousSibling;
  return (
    element.nodeName === 'TBODY' && (
      !previousSibling ||
      /* check if previousSibling is colgroup here? */
      (
        previousSibling.nodeName === 'THEAD' &&
        /^\s*$/i.test(previousSibling.textContent)
      )
    )
  )
}
@guyplusplus
Copy link

Created a pull request #31 for this issue

@alexanderadam
Copy link

Created a pull request #31 for this issue

I don't want to be pessimistic but there are also other unmerged PRs that wanted to fix things since 2018. But there wasn't a single commit to this plugin since then.
Therefore, if I may give an advice: you might consider switching to this fork and direct your PR over there instead.

@guyplusplus
Copy link

guyplusplus commented Apr 24, 2021

Thanks a lot. You are right. Seems redundant job I did there. Though table output not working 100% as I expect... I will further look at it.

@alexanderadam
Copy link

No worries. It's not really obvious. It would be great if this repo would at least be archived and get an entry stating that it's not maintained anymore.
But I didn't even get a response to that. 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants