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 not working in /news article in Hashnode #965

Open
AbbeyRenn opened this issue Aug 21, 2024 · 3 comments
Open

Table not working in /news article in Hashnode #965

AbbeyRenn opened this issue Aug 21, 2024 · 3 comments
Assignees
Labels

Comments

@AbbeyRenn
Copy link
Contributor

Describe the bug
An author recently published an article (this one: https://www.freecodecamp.org/news/how-to-effectively-manage-unique-identifiers-at-scale/) that contained a table at the end, comparing some different tools. The table looked correct in the draft in Hashnode, but once it was published, it looked terrible and wasn't formatted as a table. It looked like this:

89B7ED9C-7ED7-499F-B603-ECC2EE219F6F

The author shared this to try to replace it, and it also didn't work (according to the Hashnode preview): https://gist.github.com/gor8808/943d6cbbf89353354e716f73d677b09d#file-comparison-of-other-unique-identifier-md

To Reproduce
Go to the Hashnode editor, copy and paste the table from the above gist in, and click "Preview" - you'll see that it isn't a proper table (looks like this):

https://hashnode.com/draft/66b901a2472b70138041a56e

Expected behavior
We just need the table to look like a table with properly aligned/organized info. Here's how it looks in the draft form:

6C9F591C-86A6-4E2A-BB25-2494993ED4FE

Screenshots
See above

Desktop (please complete the following information):

  • OS: MacOS Sonoma 14.6.1
  • Browser: Chrome
  • Version: 127.0.6533.120 (Official Build) (arm64)

Smartphone (please complete the following information):
NA

Additional context
I've removed the table from the published article at this time, as it didn't look good and would've just confused readers. I'd like to add it back in once we've figured out how to create a table properly in Hashnode.

Hashnode gives this as a guide: https://support.hashnode.com/en/articles/6435291-how-can-i-add-a-table-in-a-blog-post (use markdown formatting) but it doesn't seem to work given what the author used/what I tried in the test draft.

@raisedadead
Copy link
Member

raisedadead commented Aug 21, 2024

We need to confirm if this is an issue with our Preview Service AND/OR with our News SSG or Hashnode itself.

Links:

Hashnode Preview Service:

News Repo:

  • This repo itself, but you can look at the corresponding code in the templates.

To repro, you can setup the Preview repo locally and use the 66b901a2472b70138041a56e as the id as is and investigate.

@yokomatsud
Copy link

It seems the <br> tag inside a table cell is causing the problem in the Hashnode's rich text editor.

I could reproduce the issue outside of the freeCodeCamp publication like this:

Screenshots

hashnode
hasnode_preview

It happens with either by:

  • adding <br> in a Markdown table and copy&paste it into the Hashnode editor
  • typing Shift+Enter in the table in the Hashnode editor

However, I could avoid the problem by swiching to the raw markdown editor mode. It seems this options is disabled in the freeCodeCamp publication, though.

Screenshots

raw_markdown_editor
raw_markdown_preview

@raisedadead
Copy link
Member

Okay we need to find a workaround for the table, using the rich text editor or use vanilla plain tables: https://support.hashnode.com/en/articles/6423225-markdown-guidelines#h_6933ed665d

@raisedadead raisedadead added type: bug Something isn't working help wanted Extra attention is needed scope: needs content edit and removed help wanted Extra attention is needed labels Aug 23, 2024
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

4 participants