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

Broken Staticman PR body display #223

Open
VincentTam opened this issue Jul 7, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@VincentTam
Copy link

commented Jul 7, 2019

In each PR titled "New budget", the table isn't correctly rendered. The culprit of this error is the \n in the cell. (c.f. eduardoboucas/staticman#90) This can be fixed by eduardoboucas/staticman#301, which replaces the line

table.push([field, fields[field]])

with

let field_value = fields[field]
field_value = typeof field_value === 'string' ? field_value.replace(/\r\n/g,'<br>') : field_value
table.push([field, field_value])

Here's a working example on GitLab, served by my bot @staticmanlab, which has incorporated the above PR: https://gitlab.com/pcercuei/pcercuei.gitlab.io/merge_requests/146

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.