snarkdown icon indicating copy to clipboard operation
snarkdown copied to clipboard

Feature/table

Open ShynRou opened this issue 7 years ago • 12 comments

Added table functionalty with optional header cells. I'm not sure if it's the shortest solution but it works.

ShynRou avatar Apr 03 '17 15:04 ShynRou

Looks good - we'll definitely need to inline the reduce since that's costly. Also the spacing seems off - there's an .editorconfig in this repo that should set your editor to tabs in all *.js files (requires the editorconfig plugin for Atom if you use that).

developit avatar Apr 03 '17 16:04 developit

@developit Sorry about the spacing didn't notice it. I removed the spacing issue. I'll look into optimization tomorrow.

ShynRou avatar Apr 03 '17 21:04 ShynRou

Awesome, thanks!

developit avatar Apr 03 '17 22:04 developit

@developit The reduce function doesnt seem that costly in this situation: http://jsben.ch/#/Coso0

This evening I'll replace the v.trim() with parse(v), then it should allow inline styling

ShynRou avatar Apr 04 '17 12:04 ShynRou

@developit might have found a way to minimize it, by combining the header and content. I'll try it out later.

ShynRou avatar Apr 04 '17 17:04 ShynRou

@developit Shaved off 10 bytes. I think I reached my personal limit.

ShynRou avatar Apr 05 '17 08:04 ShynRou

LGTM!

midudev avatar Jan 18 '18 10:01 midudev

Looking good! I'll take a look at this locally.

developit avatar Jan 22 '18 20:01 developit

Side note on reduce: I'm seeing vast speed improvements in .reduce since node v0.12/v4 days. Extra mem allocs are mostly cleaned up in the faster GC pass. Both for string & array return types!

The only reason I avoid now is for closer WASM compat.

Either way, great work @ShynRou - super excited to see this get added!

justsml avatar Feb 13 '18 03:02 justsml

Still not merged... I have written my own tiny markdown parser in the meantime. So if you need Table or recursive List support: https://github.com/shynrou/micro-down

ShynRou avatar Apr 19 '18 11:04 ShynRou

@developit what help do you need to get this merged? I may help and I'm pretty interested on having this merged. :)

midudev avatar Jun 06 '18 10:06 midudev

+1 !!

mesqueeb avatar May 03 '20 01:05 mesqueeb