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

Single-column tables rendered incorrectly in README.md #546

Open
ichordev opened this issue Jun 28, 2023 · 6 comments
Open

Single-column tables rendered incorrectly in README.md #546

ichordev opened this issue Jun 28, 2023 · 6 comments
Labels

Comments

@ichordev
Copy link

GitHub's markdown allows for single-column tables.

My Header
Item A
Item B
Item C

Written as:

| My Header |
|-----------|
| Item A    |
| Item B    |
| Item C    |

However on the DUB registry in the Info section of a package, they turn into this soup:

| My Header | |-----------| | Item A | | Item B | | Item C |

You can see this happen with a few BindBC packages on the registry.

It's a small thing, but it makes the structure of a document look much nicer when they're rendered properly. They're even used in the DIP template.

@WebFreak001
Copy link
Member

we might want to consider using https://github.com/AuburnSounds/commonmark-d instead of the vibe built-in markdown capabilities (and maybe even deprecate/separate them from vibe)

@ichordev
Copy link
Author

we might want to consider using https://github.com/AuburnSounds/commonmark-d

Ooh, would that mean that HTML tags would get rendered properly, too?

@WebFreak001
Copy link
Member

the security aspect is something we would need to test for, since we don't want to accept any script tags or any kind of script injection

@ichordev
Copy link
Author

Wow… why does that markdown standard allow you to use <script>!? HTML in markdown is usually just meant to be for advanced formatting (images, spoilers, etc.)

@WebFreak001
Copy link
Member

well since the markdown converter might just pipe HTML tags as-is to the output. I don't see any allow-list of tags in that parser, so it might not be in the scope of it.

@ichordev
Copy link
Author

Well the spec it follows says it should output “raw, unescaped HTML”, so I’m thinking the parser does that to be compliant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants