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

Feature/table #18

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Feature/table #18

wants to merge 8 commits into from

Conversation

ShynRou
Copy link

@ShynRou ShynRou commented Apr 3, 2017

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

Dustin Hagemeier added 2 commits April 3, 2017 17:07
@developit
Copy link
Owner

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).

@ShynRou
Copy link
Author

ShynRou commented Apr 3, 2017

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

@developit
Copy link
Owner

Awesome, thanks!

@ShynRou
Copy link
Author

ShynRou commented Apr 4, 2017

@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
Copy link
Author

ShynRou commented Apr 4, 2017

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

@ShynRou ShynRou closed this Apr 4, 2017
@ShynRou ShynRou reopened this Apr 4, 2017
@ShynRou
Copy link
Author

ShynRou commented Apr 5, 2017

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

@Jonarod Jonarod mentioned this pull request Oct 1, 2017
@midudev
Copy link

midudev commented Jan 18, 2018

LGTM!

@developit
Copy link
Owner

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

@justsml
Copy link

justsml commented Feb 13, 2018

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!

@ShynRou
Copy link
Author

ShynRou commented Apr 19, 2018

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

i = l.length,
table = '',
r = 'td>';
while ( i-- ) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might want to remove the spaces inside the parentheses for consistency with the rest of the file

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and to save some bytes ofc ;)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed them for code-styles sake
@tbjgolden since it's minified spaces don't add to final size

@midudev
Copy link

midudev commented Jun 6, 2018

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

@mesqueeb
Copy link
Contributor

mesqueeb commented May 3, 2020

+1 !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants