Skip to content

Left Margins with Cells Including Newlines Don't Work #130

@gremerritt

Description

@gremerritt

If you have a table that has cells including newlines, the left_margin does not appear to apply the left margin to all lines:

irb(main):012:0> puts Terminal::Table.new(
  rows: [['one', "Some string\nthat has\nsome newlines\n"], [:two, :another_string]], 
  style: { margin_left: "\t" }
)
        +-----+----------------+
        | one | Some string    |
|     | that has       |
|     | some newlines  |
        | two | another_string |
        +-----+----------------+

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions