Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

tables don't get rendered #181

Closed
myessentialapps opened this Issue · 7 comments

4 participants

@myessentialapps

I'm using redcarpet as the engine in middleman. The table layout does not render a table in html

@vmg
Owner

Are you sure you have enabled the :tables extension in the parser?

@myessentialapps

I'll double check. Probably not. Can I use the same directives to decorate the pre tag for Google code syntax pretty print? I need the pre tag to have a class added. I don't want to resort to jquery.

@robin850
Collaborator

@myessentialapps : Do you still have this issue with Middleman and table rendering please?

@myessentialapps
@robin850
Collaborator

Thanks for the quick answer :)

@robin850 robin850 closed this
@kaze

I'm trying to use the table rendering extension, but it doesn't work for me:

irb -->: text = "\n\n| head | head | head |\n| - | -: | :-: |\n| content | 1 | 2 |\n\n"
    ==> "\n| head | head | head |\n| - | -: | :-: |\n| content | 1 | 2 |\n\n"

irb -->: Redcarpet::Markdown.new(Redcarpet::Render::HTML.new, tables: true).render(text)
    ==> "<p>| head | head | head |\n| - | -: | :-: |\n| content | 1 | 2 |</p>\n"

Could somebody help me with some advice?

@robin850
Collaborator

@kaze : Actually, you need to define where headers are with |-| like this:

| head | head | head |
|------|------|------|
| - | -: | :-: |
| content | 1 | 2 |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.