Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.

Broken Staticman PR body display #223

@VincentTam

Description

@VincentTam

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions