Skip to content

Try out a Pretty wrapper for pretty-printing #9

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

Merged
merged 1 commit into from
Apr 25, 2018
Merged

Conversation

yurivish
Copy link
Collaborator

@yurivish yurivish commented Apr 25, 2018

@tshort thoughts? If this feels like the right approach I'll add back the documentation, adjusted appropriately.

julia> using Hyperscript

julia> @tags h1 span a

julia> node = h1(span("This is "), a("a link"), span("to nowhere."))
<h1><span>This is </span><a>a link</a><span>to nowhere.</span></h1>

julia> Pretty(node)
<h1>
  <span>This is </span>
  <a>a link</a>
  <span>to nowhere.</span>
</h1>

julia> Pretty(node, indent="\t")
<h1>
	<span>This is </span>
	<a>a link</a>
	<span>to nowhere.</span>
</h1>

@tshort
Copy link
Contributor

tshort commented Apr 25, 2018

Looks good to me...

@yurivish yurivish merged commit f4f1915 into master Apr 25, 2018
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