Skip to content

Attrs don't work with tables #5017

@alkaitagi

Description

@alkaitagi

Describe the bug

arve0/markdown-it-attrs doesn't affect tables.

For example, this table won't receive the special class on v1.6.4.

header1 | header2
------- | -------
column1 | column2

{.special}

However, it does work on the latest alpha (v2.0.0-alpha12).

Reproduction

Create the vitepress.new template, use the default latest alpha v2.0.0-alpha12.

Place this code, verify the table receives the class.

header1 | header2
------- | -------
column1 | column2

{.special}

Then switch to the latest production [email protected], see that the class is no longer being applied.

Expected behavior

This should work on [email protected].

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 20.19.1 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.8.2 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    vitepress: ^1.6.4 => 1.6.4

Additional context

Most likely This was fixed on the alpha track by #4082. I was testing on a blank vitepress.new template; the table interaction works with 2.0.0-alpha.4 and 2.0.0-alpha.12 but doesn't work on 1.6.4 and 2.0.0-alpha.3.

Can we Is there a plan to get it backported to the production track? Or is v1 no longer being updated and instead we should look forward to v2 release?

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions