1
0
Commit Graph

63 Commits

Author SHA1 Message Date
f332d6bf95 Major restructure in how tables are formatted. Options max_depth and recursion has been deprecated. 2017-07-25 17:49:06 +02:00
fe1c166044 Minor documentation and restructure. 2017-07-25 15:37:37 +02:00
aa4ca9d67d Depricated short_builtins. 2017-07-24 19:35:19 +02:00
0250c0f014 TODO structure 2017-07-24 19:16:29 +02:00
3ea1aa2efe Minor changes to imports 2017-07-24 11:49:45 +02:00
6d56713627 Implemented tabular style, for appropriate tables. Turned out to be more robust than I anticipated. 2017-07-22 16:36:32 +02:00
762b8f3d20 Updated readme, and a bit of commentary. 2017-07-22 14:44:24 +02:00
f3cddec4d0 Improved handling of strings. Code is much clearer. cut_strings option has been removed. 2017-07-21 13:15:04 +02:00
39dc9ce84e Added recursion option for displaying every table even if already displayed. 2017-07-21 13:12:02 +02:00
1f20c29f68 Moved strings and their tests to new file. 2017-07-20 19:20:29 +02:00
8f8e5b9c7f Fixed issue where default values would leak when calling pretty
A clone of the given options are maintained instead.
2017-07-20 13:43:30 +02:00
93beb4bd1e Finally implemented column alignment
It's currently a bit limited in scope, but looks great when active.
2017-07-20 12:01:46 +02:00
0b0c2330ec Minor work and documentation. 2017-07-20 10:38:24 +02:00
f9e9f91663 Minor documentation 2017-07-18 13:38:05 +02:00
d0d8e6476f Bunch a' thoughts and documentation. 2017-07-17 21:33:11 +02:00
33daa3b8be Restructure and removal of some debug options. 2017-07-15 22:56:10 +02:00
e5f53b9b63 The embed_loaded_funcs option has been removed, and 'short' loaded functions will automatically be embedded. 2017-07-15 20:10:49 +02:00
6bd797c75e Improved sorting. 2017-06-25 13:16:34 +02:00
9a6a5b4b51 Function formatting will now automatically pull documentation from a lua file, if it knows where to look. 2017-06-24 20:06:36 +02:00
3bb599e976 Updated test_function.lua to reflect the new design. The system also warns against using experimental and debug options. 2017-06-24 18:53:59 +02:00
4a41111d1e analyse_structure is not automatically called, if no info regarding a table could be found. 2017-06-24 18:36:01 +02:00
72f1ba5dfd Fixed some issues where pretty would create new global variables. 2017-06-16 17:04:14 +02:00
b37a02c850 Now avoids analysing tables deeper than max_depth. 2017-06-15 19:02:54 +02:00
288d9e4de8 Changed project priorities, and removed lots of redundant features from number.lua 2017-06-15 16:30:34 +02:00
2cc9301c58 Improved alignment of functions. 2017-06-11 13:53:06 +02:00
5c7354e40f Made four spaces the default indent, instead of a tab character. 2017-06-09 17:24:05 +02:00
4e7be31964 Added option for disabling soft numbers. 2017-06-09 17:08:53 +02:00
531967d13b Removed unused constants. 2017-06-09 16:25:44 +02:00
4e7a1a9839 Improved error handling in pretty. 2017-06-09 16:20:39 +02:00
f0670897bd Added new debug option, to display the addresses of tables in comments. 2017-06-06 00:22:37 +02:00
48ca04bcb8 Changed all function signatures to exclude the old options arguments.. 2017-06-05 23:24:38 +02:00
7005a080c0 Working on outphasing the options value. 2017-06-05 23:13:50 +02:00
192575ded8 String Builder is now an actual object, and can now be called to append. 2017-06-05 22:58:09 +02:00
97ced3a173 Merged format_map into format_table. 2017-06-05 22:47:07 +02:00
bf9c5a6749 Removed some old orphaned functions. 2017-06-05 22:35:47 +02:00
65c2acb447 Removed the possibility of the 'max' depth value, refactored format_table, and added lots of asserts in rest of pretty.lua 2017-06-05 22:34:23 +02:00
7ccb9e8123 Added vulgar_fraction function, and increased resilience. 2017-05-25 22:53:02 +02:00
0f26759ee2 Moved to doing seperator fixing just before returning from pretty. 2017-04-14 14:01:01 +02:00
f29004fe17 Improved resilience of library. 2017-04-14 13:24:29 +02:00
87b12e15b2 Fixed issues with analýse_structure.lua
The most significant was a misclassification of tables with number
exclusive keys, with huge jumps between each one.
Example: { 1, [300] = 300 }

This was caused by logic faults in `get_table_info`, which has been fixed.

When solving above issue, a two new issues appeared:

1.	Due to a logic fault, the count of number of elements in a table was wrong,
	leading to issues with tables with boolean keys. This was fixed with simple
	logic changes.
2.	Some very small tables (1 element) would be classified as sets, and thus
	rendered wrongly. This was fixed by adding a MINIMUM_NUMBER_OF_SET_ELEMENTS
	constant.
2017-04-14 13:06:43 +02:00
155c877987 Alternative process for determining short tables
This one is based on the representative width of the table. Not only
does this produce better results, but it's also more futureproof.
2017-04-14 12:19:23 +02:00
5bee4a7378 Small holes in sequences will now be filled with nil, rather than triggering a reclassification to PURE_MAP. 2017-04-14 10:56:38 +02:00
5a3e9d0e27 Improved sorting of tables. 2017-04-05 13:10:23 +02:00
ec3ba2cab9 Improved error messages, and fixed issue with importing from other modules 2017-04-05 12:21:43 +02:00
736335b208 Added check for bad options. 2017-04-03 16:39:19 +02:00
8f956bf444 Moved function formatting into own file. 2017-04-03 11:55:49 +02:00
0a79b830ba Moved some constants into their own file, more info is stored in l, and improved some marker stuff. 2017-04-03 11:24:51 +02:00
d848c96fb1 Very minor work on recursion. 2017-01-16 16:22:46 +01:00
cad8258a6f Added number.lua file, to allow more informative representations of numbers. 2017-01-16 16:10:10 +01:00
b405afeae8 Improved compatibility with PUC Lua 5.1 - 5.3 2017-01-05 15:50:44 +01:00