plnkr / feedback

Feedback on Plunker
19 stars 11 forks source link

Love the new plnkr, but... #417

Open jklueck opened 5 years ago

jklueck commented 5 years ago

I really miss the "pretty print" function in the older version! It was one of the main reasons I kept using plnkr, despite having a terrible time spelling the URL correctly (plinkr... plnker... plunkr... no, plnkr)!

I thought maybe "Format Document" was supposed to do that, but it doesn't seem to do anything at all.

Thanks.

ggoodman commented 5 years ago

@jklueck that's unfortunate. The new Plunker should be using a customized version of prettier to format most relevant document types. What kind of document were you trying to format?

ggoodman commented 5 years ago

On my mac, Alt-Shift-F appears to be working as expected. You can also format the contents of a pane by clicking the icon in the top-right of editor panes.

jklueck commented 5 years ago

I'm working on a webpage which currently has some CSS and Javascript (in the appropriate places).

Maybe I just don’t know what to expect from it. I used to click a little check mark and it made code like this:

<table><tr><td>name</td><td>Jamie</td></tr></table>

...look like this:

<table>
    <tr>
        <td>name</td>
        <td>Jamie</td>
    </tr>
</table>

In "Alpha Plunker" the Alt-Shift-F command only seems to move the final } down from the ends of my CSS.

.red { color: red; } becomes:

.red {
    color: red;
}

Which I actually think is unnecessary. BUT it leaves the above <table> trainwreck just as it is.

I am also using a Mac and that's how it behaves in Chrome. In Safari, it doesn't work at all. I have not tested Firefox.

ggoodman commented 5 years ago

Hi @jklueck. Interesting behaviour for the html formatting. I agree that it might not be what you're looking for. I'll look into this next time I visit formatting.