cli-table2 icon indicating copy to clipboard operation
cli-table2 copied to clipboard

Preset for generating md-like tables

Open qfox opened this issue 8 years ago • 2 comments

It's something like:

    style: { compact: true },
    chars: {
        'top': '' ,    'top-mid': '' ,    'top-left': '' ,    'top-right': '',
        'bottom': '' , 'bottom-mid': '' , 'bottom-left': '' , 'bottom-right': '',
        'left': '|' ,  'left-mid': '|' ,   'mid': '-' ,         'mid-mid': '|',
        'right': '|' , 'right-mid': '|' ,  'middle': '|'
    },

I guess it's a common case and would be very nice to have this preset as build-in one to use as simple as:

    preset: 'md'

qfox avatar Jul 19 '17 20:07 qfox

Any luck with getting this to happen? I can't figure out how to have the header styled differently from the body.

GantMan avatar Nov 24 '17 22:11 GantMan

@zxqfox - we got this figured out (not the cleanest) but we'll be using our solution for our lib. I was going to cheat and just do 3 dashes, required by markdown, but our CTO jumped in and did it 100%.

Was added here: https://github.com/infinitered/gluegun/pull/284

GantMan avatar Nov 25 '17 02:11 GantMan