Skip to content

Commit

Permalink
docs: attempt to make org/github rendering work better
Browse files Browse the repository at this point in the history
surprised the image name/captions don't work!
  • Loading branch information
russmatney committed Mar 20, 2024
1 parent fcf7aed commit 77cebdc
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion readme.org
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,26 @@ Checkout [[file:src/Example.gd][src/Example.gd]] for this code.

~Log.pr()~ colorizes and prints the passed data structures.

*** Example.gd:

#+name: Example.gd
#+caption: ~Log.pr()~ should Just Work in most (all?) cases
[[./docs/images/example_gd_impl.png]]

~Log.pr()~ should Just Work in most (all?) cases

You can opt-in to pretty printing in your objects by implementing
`to_printable()`,
which gets picked up by Log's static method via duck-typing.

*** Output of Example.gd:

#+name: output of Example.gd
#+caption: ~prn~ (vs ~pr~) adds newlines between values
[[./docs/images/example_gd_output.png]]

~prn~ (vs ~pr~) adds newlines between values

This makes dictionaries and arrays much more readable at a glance, which speeds
up debugging and reduces eye-strain.

Expand All @@ -55,7 +63,8 @@ CLOSED: [2024-03-20 Wed 16:40]
** [X] impl, tests for log() (duck-typing opt-in to pretty printing per object)
CLOSED: [2024-03-20 Wed 17:01]
should be argless
** [ ] license
** [X] license
CLOSED: [2024-03-20 Wed 17:45]
** [ ] write readme
*** non-Log.gd-based godot printing quick hits
- print, prints, printt, print_rich
Expand Down

0 comments on commit 77cebdc

Please sign in to comment.