Skip to content
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

Issue #76 Native pretty print #80

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Issue #76 Native pretty print #80

wants to merge 1 commit into from

Conversation

marklister
Copy link

No description provided.

@marklister
Copy link
Author

This pull request addresses issue #76.

<p style="float: left;">
This is my first paragraph
</p>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want the pretty-printer to leave these gaps between the tags? I'd rather it didn't.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scala> div(
     |   p(float:="left")(
     |     "This is my first paragraph"
     |   ),
     |   a(tabindex:="10")(
     |     p("Goooogle")
     |   ),
     |   input(disabled:="true")
     | ).pretty
res2: scalatags.text.Utils.Pretty =
<div>
    <p style= "float: left;" > This is my first paragraph </p>
    <a tabindex= "10" >
        <p> Goooogle </p>
    </a>
    <input disabled= "true" />
</div>

Does that look OK?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lihaoyi do you have a strong preference re combining tags on one line like this:
<p> Goooogle </p>

or do you think this is better:

        <p>
            Goooogle
        </p>

My feeling is to go with the second.

@marklister
Copy link
Author

I'll sort these out in the next day or two...

@marklister
Copy link
Author

@lihaoyi, see if this is a bit closer -- I don't mind fixing it again as many times as necessary.

@aholland
Copy link

Uhm, this would be very nice. What happened to the PR please?

@chipsenkbeil
Copy link

@lihaoyi, I'm assuming this should be closed?

@jhegedus42
Copy link

jhegedus42 commented Mar 16, 2017

@lihaoyi Could this be merged ? I would find also useful for pretty print.

@Andrei-Pozolotin
Copy link

@lihaoyi, please merge

@dave-kav
Copy link

dave-kav commented Jan 4, 2018

@lihaoyi Would also very much like this feature merged if possible!

@fancywriter
Copy link

Hello from 2020!
This feature is still very nice to have! 🙏

@ckipp01
Copy link
Collaborator

ckipp01 commented Jan 1, 2023

@lolgab is this something that you'd accept? If so I'd be happy to rebase and get this up to date.

@nafg
Copy link
Contributor

nafg commented Oct 31, 2023

@ckipp01 based on #76 (comment) I think it should be

@nafg
Copy link
Contributor

nafg commented Oct 31, 2023

Or maybe #127

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.

10 participants