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 does not have caption #67

Closed
AmarOk1412 opened this issue Jun 8, 2017 · 5 comments
Closed

Table does not have caption #67

AmarOk1412 opened this issue Jun 8, 2017 · 5 comments
Labels
misc/easy Good first issue

Comments

@AmarOk1412
Copy link
Member

AmarOk1412 commented Jun 8, 2017

Like #66 we need a plugin to embed caption for tables

Example of code:

a | b
----|----
c | d
Table: dummy

+-----+-----+
|  a  |  b  |
+-----+-----+
|  c  |  d  |
+-----+-----+
Table: dummy
@artragis
Copy link
Member

They have it, only rebber needs a full plugin for that but it is not so easy.

@AmarOk1412
Copy link
Member Author

AmarOk1412 commented Jun 21, 2017

I reopen this because of:

+-----+-----+
|  a  |  b  |
+-----+-----+
|  c  |  d  |
+-----+-----+
Table: dummy

@AmarOk1412 AmarOk1412 reopened this Jun 21, 2017
@vhf
Copy link
Contributor

vhf commented Jun 21, 2017

Please explain what's wrong :)

@AmarOk1412
Copy link
Member Author

AmarOk1412 commented Jun 21, 2017

Yeap @vhf I know, but I didn't know what's wrong. I think I understand now!

@artragis Gotcha! https://github.com/zestedesavoir/zmarkdown/blob/master/packages/remark-captions/src/index.js#L17 (Object.keys(legendBlock).forEach(nodeType => visit(tree, nodeType, externLegendVisitorCreator(blocks))))

The plugin only visit nodes in legendBlock, not in blocks so new nodes (like gridTable) in blocks is simply ignored. I think we just have to replace legendBlock by blocks and add a new test (and it will work). If you want to correct this (or I can do this after the ping plugin).

@AmarOk1412 AmarOk1412 added the misc/easy Good first issue label Jun 21, 2017
@artragis
Copy link
Member

Ok thank you. I fix it quickly.

@vhf vhf closed this as completed Jun 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
misc/easy Good first issue
Projects
None yet
Development

No branches or pull requests

3 participants