75

Prettier supports formatting Markdown text and a bunch of languages. Can we add it as a button or format on save?

All the posts will have a unified look and feel, without the extra spaces, wrong indentations, lists with different styles, etc.

17
  • To do what? Does it replace the current editor? Something else? What is wrong with the current WMD editor / markdown formatting?
    – rene
    Oct 8, 2019 at 19:04
  • 2
    @rene: prettier.io Oct 8, 2019 at 19:05
  • @rene: Presumably, it prettifies the code you post. Oct 8, 2019 at 19:12
  • 4
    There's a bit more to implementing Prettier than "add[ing] it as a button". Since the browser implementation requires plugins and parsers to be loaded when calling format. That could be challenging. It's not as easy as adding it to your favorite IDE. Oct 8, 2019 at 19:21
  • 5
    And Prettier only seems to support web application things. I feel like any tool we choose to do this would have to be more inclusive. Oct 8, 2019 at 19:23
  • 2
    @AdamRackis The question is not tagged as a feature-request, so it won't get found as one, even if Stack Overflow were interested in rewriting that part of their code base... There's good reason to vote to close the question as written. Please edit the question if you find value in it. Oct 8, 2019 at 19:23
  • 1
    alternatively, add indent buttons for highlighted lines (which may be more complicated) Oct 8, 2019 at 19:30
  • 6
    It might help if you edit your question to explain why you think this is needed. Oct 8, 2019 at 19:40
  • 2
    This opens up some interesting additional questions. Would you want the Prettier default configuration? If so, you would be using a tab width of 2 spaces, amongst other things.
    – schellack
    Oct 8, 2019 at 20:05
  • 2
    This question is not a duplicate, as the other one is talking only about formatting code, while I'm talking about formatting the whole thing.
    – Lipis
    Oct 8, 2019 at 20:25
  • 1
    Possible duplicate of Let's have a "Tidy Up" button! Oct 8, 2019 at 20:32
  • 3
    Let's not apply this for Python, though -- from what I've heard, formatting matters in that language.
    – S.S. Anne
    Oct 8, 2019 at 20:54
  • 3
    (1) this definetly has to be optional (sometimes weird formatting matters, prettier doesnt support everything, etc.) (2) this definetly has to lazy load, as Prettier is quite a large library. And I agree that some kind of clarification would be helpful, but this definetly not unclear. Oct 8, 2019 at 21:13
  • 1
    @JonasWilms it's clear that it has to do something it's not clear what or why. Specifics should be added. It's currently a vague suggestion, not a good feature request. I wouldn't be surprised if half the people who upvoted it did it for a different reason than the other half and neither actually considered the other group's motive.
    – VLAZ
    Oct 8, 2019 at 21:15
  • 9
    I'm still not convinced there's a problem here, or at least not one that can be solved with an automated tool. Prettifying the markdown seems like an enormous waste of dev time to me, and as for actual code, there's lots of disagreement on styling (what is "wrong" indentation to you might be fine for someone else) and the people who don't bother proofreading their formatting before they post probably aren't going to even notice the button is there. Oct 8, 2019 at 22:24

1 Answer 1

-1

The Prettier team started an extension for Chrome.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .