Skip to content

[BUG] Table support does not work #798

@hron84

Description

@hron84

In IRB, I tried to do the following:

s = "| Type | Content ID | Revision |\n|------------------------------|\n| ? | 10000003 | 0 |\n| ? | 10000004 | 0 |\n| ? | 10000005 | 0 |\n| ? | 10000002 | 1 |\n| ? | 10000118 | 2 |\n| ? | 10000055 | 6 |\n| ? | 10000001 | 26 |\n|------------------------------|\n"
markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, tables: true)
puts markdown.render s

But the output is not the expected:

<p>| Type | Content ID | Revision |
|------------------------------|
| ? | 10000003 | 0 |
| ? | 10000004 | 0 |
| ? | 10000005 | 0 |
| ? | 10000002 | 1 |
| ? | 10000118 | 2 |
| ? | 10000055 | 6 |
| ? | 10000001 | 26 |
|------------------------------|</p>

I admint maybe this is an errorneous usage, but the documentation does not clear about the table rendering.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions