8000 Docs Theme - MD tables not working anymore in 0.8.0 · Issue #653 · nuxt/content · GitHub 8000
[go: up one dir, main page]

Skip to content
Docs Theme - MD tables not working anymore in 0.8.0 #653
@paolodenti

Description

@paolodenti

Version

@nuxt/content-theme-docs@^0.8.0
@nuxt/content" "^1.11.0
nuxt@2.14.7

Steps to reproduce

yarn create nuxt-content-docs <project-name>

Add a simple table to index.md.

| Col1  | Col2 |
| ------| -----|
| Item1 | 543  |
| Item2 | 226  |
| Item3 | 543  |

What is Expected?

Markdown tables were working in 0.7.1. Same project upgraded to 0.8.x stopped working.

What is actually happening?

The markdown table is not rendered as a table. It is rendered as plain text.

It looks the issue is in remark-parse version 9.0.0.

The problem can be manually fixed in the following way: manually change the dependency in yarn.lock from

"@nuxt/content@^1.11.0":
  ...
  dependencies:
    ...
    remark-parse "^9.0.0"
    ...

remark-parse@^9.0.0:
  version "9.0.0"
  resolved "https://registry.yarnpkg.com/remark-parse/-/remark-parse-9.0.0.tgz#4d20a299665880e4f4af5d90b7c7b8a935853640"
  integrity sha512-geKatMwSzEXKHuzBNU1z676sGcDcFoChMK38TgdHJNAYfFtsfHDQG7MoJAjs6sgYMqyLduCYWDIWZIxiPeafEw==
  dependencies:
    mdast-util-from-markdown "^0.8.0"

to the old 0.7.1 dependency

"@nuxt/content@^1.11.0":
  ...
  dependencies:
    ...
    remark-parse "^8.0.3"
    ...

remark-parse@^8.0.3:
  version "8.0.3"
  resolved "https://registry.yarnpkg.com/remark-parse/-/remark-parse-8.0.3.tgz#9c62aa3b35b79a486454c690472906075f40c7e1"
  integrity sha512-E1K9+QLGgggHxCQtLt++uXltxEprmWzNfg+MxpfHsZlrddKzZ/hZyWHDbK3/Ap8HJQqYJRXP+jHczdL6q6i85Q==
  dependencies:
    ccount "^1.0.0"
    collapse-white-space "^1.0.2"
    is-alphabetical "^1.0.0"
    is-decimal "^1.0.0"
    is-whitespace-character "^1.0.0"
    is-word-character "^1.0.0"
    markdown-escapes "^1.0.0"
    parse-entities "^2.0.0"
    repeat-string "^1.5.4"
    state-toggle "^1.0.0"
    trim "0.0.1"
    trim-trailing-lines "^1.0.0"
    unherit "^1.0.4"
    unist-util-remove-position "^2.0.0"
    vfile-location "^3.0.0"
    xtend "^4.0.1"

The new dependency to remark-parse 9.0.0 has been added in nuxt/content@1.11.0.

I suggest the remark-parse dependency in nuxt/content is forced to remark-parse "8.0.3" instead of remark-parse "^9.0.0" until the issue is fixed in remark-parse

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0