Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Fix docs that use safe_to_string #49

Open
brianberlin opened this issue Apr 4, 2019 · 1 comment
Open

Fix docs that use safe_to_string #49

brianberlin opened this issue Apr 4, 2019 · 1 comment

Comments

@brianberlin
Copy link
Contributor

brianberlin commented Apr 4, 2019

any ideas on how to format the doctests that use safe_to_string better?

Eg. https://hexdocs.pm/harmonium/Harmonium.html#number_input_stack/3

@brianberlin brianberlin changed the title Better documentation strategy Fix docs that use safe_to_string Apr 4, 2019
@grossvogel
Copy link
Contributor

grossvogel commented Sep 3, 2019

We could definitely go from \\\" and \\n to \" and \n by using ~S on the doc blocks, but I don't think there's a way to put the linebreaks in there instead of \n.

On some of the tests that exercise specific options we might get some mileage by showing that a certain parameter causes a certain substring to appear in the output rather than checking the whole output, but that's not going to work in general, and it takes away some of the illustrative power of the examples.

It might be that the best way to do this would be to let the docs focus on teaching the functionality and move the ugly test cases into regular test modules (where they can use heredoc and therefor be much more tractable)

This was referenced Sep 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants