# Force a linebreak before and after a quote

**URL:** https://meta.discourse.org/t/force-a-linebreak-before-and-after-a-quote/270376
**Category:** Development
**Created:** [March 30, 2023, 6:30pm UTC](https://meta.discourse.org/t/force-a-linebreak-before-and-after-a-quote/270376 "2023-03-30T18:30:55Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![kiefferr](https://avatars.discourse-cdn.com/v4/letter/k/a5b964/32.png) [@kiefferr](https://meta.discourse.org/u/kiefferr)
#### Post date: [March 30, 2023, 6:30pm UTC](https://meta.discourse.org/t/force-a-linebreak-before-and-after-a-quote/270376/1 "2023-03-30T18:30:55Z")

</div>

Any chance anyone has come upon an easy solution in the last few years to force a line break both before and after a quote?

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [March 30, 2023, 7:01pm UTC](https://meta.discourse.org/t/force-a-linebreak-before-and-after-a-quote/270376/2 "2023-03-30T19:01:53Z")

</div>

I think @Canapin came up with a theme component method [How to override the buildQuote function? - #2 by Canapin](https://meta.discourse.org/t/how-to-override-the-buildquote-function/164355/2) some time back, if that’s any help?

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [March 30, 2023, 7:22pm UTC](https://meta.discourse.org/t/force-a-linebreak-before-and-after-a-quote/270376/3 "2023-03-30T19:22:40Z")

</div>

Yeah, I think I tested it several days ago and it still work if I’m not mistaken. A bit overkill code nonetheless, just to add a new line.

---

<div class="post-metadata">

### Author: ![kiefferr](https://avatars.discourse-cdn.com/v4/letter/k/a5b964/32.png) [@kiefferr](https://meta.discourse.org/u/kiefferr)
#### Post date: [March 30, 2023, 7:25pm UTC](https://meta.discourse.org/t/force-a-linebreak-before-and-after-a-quote/270376/4 "2023-03-30T19:25:36Z")

</div>

Thanks for the reply. Seems to work nicely on his end, but similar to the other poster in that thread, I couldn’t get his script to fire when I pasted it in .

---

<div class="post-metadata">

### Author: ![asc](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/asc/32/288324_2.png) [@asc](https://meta.discourse.org/u/asc)
#### Post date: [March 30, 2023, 8:45pm UTC](https://meta.discourse.org/t/force-a-linebreak-before-and-after-a-quote/270376/5 "2023-03-30T20:45:25Z")

</div>

I was able to get that working by adding

```plaintext
const composerController = api.container.lookup("controller:composer")

```

to the bottom of the theme component code. It’s related to [api.modifyClass sometimes(!) not working - #12 by RGJ](https://meta.discourse.org/t/api-modifyclass-sometimes-not-working/212413/12)

---

<div class="post-metadata">

### Author: ![kiefferr](https://avatars.discourse-cdn.com/v4/letter/k/a5b964/32.png) [@kiefferr](https://meta.discourse.org/u/kiefferr)
#### Post date: [March 30, 2023, 9:12pm UTC](https://meta.discourse.org/t/force-a-linebreak-before-and-after-a-quote/270376/6 "2023-03-30T21:12:06Z")

</div>

Hey, thank you very much! That did the trick.
