Skip to content

Conversation

mindreframer
Copy link
Contributor

problem:

  • test/html_macros_test.exs:7: warning: you are piping into a function call without parentheses, which may be ambiguous.

solution:

  • wrap params to Enum.each in parentheses

problem: 
- test/html_macros_test.exs:7: warning: you are piping into a function call without parentheses, which may be ambiguous.

solution: 
- wrap params to Enum.each in parentheses
wkhere added a commit that referenced this pull request Jan 22, 2016
@wkhere wkhere merged commit 646417b into wkhere:master Jan 22, 2016
@wkhere
Copy link
Owner

wkhere commented Jan 22, 2016

Cool! thx, I discovered yet another few in lib/html.ex

Fixes just went to 0.6.1 in Hex.

@mindreframer
Copy link
Contributor Author

Cool! Thx for the library! Discovering some nice patterns in your code....

One question though: is there any possibility for pretty printing the html output? (I did not find any...)

@wkhere
Copy link
Owner

wkhere commented Jan 22, 2016

Pretty-printing - no.
The only thing remotely similar to nice output is that tag closings are generated with \n at start, which at least doesn't make the whole html one kilometer-long line. But it of course doesn't provide proper indentations.

One more thing, I don't want to scare you out of this project :], but it contains a subtle bug at the conceptual level and it is visible when you would start to nest your html-building constructs in different functions (or macros). Without going further, it's fine to say that the usage of this project is fine as long as you use don't call builders one from another.

Having said that, it's nice to hear somebody uses it, or plays with with for whatever purposes, even if educational.

@mindreframer
Copy link
Contributor Author

Ah, I see.
Thanks for the hint considering the subtle bug.

Would it be good to document that "behaviour" with a test and if it is not fix-able, maybe put it in a "Gotchas" section in the readme? That way you're keep it very transparent for your users and maybe somebody decides to give it a shot fixing it.

Thoughts?

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

Successfully merging this pull request may close these issues.

2 participants