# 对话文本格式（使用“－”代替“•”）

**URL:** <https://meta.discourse.org/t/dialogue-text-formatting-instead-of/119658>\
**Category:** Support\
**Created:** [2019年六月6日 12:04 UTC](https://meta.discourse.org/t/dialogue-text-formatting-instead-of/119658 "2019-06-06T12:04:28Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![calebs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/calebs/32/148838_2.png) [@calebs](https://meta.discourse.org/u/calebs)\
**Post date:** [2019年六月6日 12:04 UTC](https://meta.discourse.org/t/dialogue-text-formatting-instead-of/119658/1 "2019-06-06T12:04:28Z")

</div>

Hello. We have recently added a subcategory for literature, where people will need to use the following formatting in dialogues:

-Hello, how are you?  
-I’m pretty good, thanks.

Unfortunately, when there is a space between the - and the text, it automatically turns into bullet points. Is there a way to fix that and keep them as dashes?

---

<div class="post-metadata">

**Author:** ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)\
**Post date:** [2019年六月6日 12:17 UTC](https://meta.discourse.org/t/dialogue-text-formatting-instead-of/119658/2 "2019-06-06T12:17:41Z")

</div>

> [@calebs](#):
>
> Is there a way to fix that and keep them as dashes?

Yes, put a backslash `\` before the dash `-`

Like so

```plaintext
\- Hello, how are you?
\- I’m pretty good, thanks.

```

which renders as

- Hello, how are you?  
- I’m pretty good, thanks.

---

<div class="post-metadata">

**Author:** ![calebs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/calebs/32/148838_2.png) [@calebs](https://meta.discourse.org/u/calebs)\
**Post date:** [2019年六月6日 12:33 UTC](https://meta.discourse.org/t/dialogue-text-formatting-instead-of/119658/3 "2019-06-06T12:33:07Z")

</div>

Thank you, but we can’t expect from all our forum members to know about the backslash. Is there another way to do it? It is ok to completely replace the bullets with dashes, if that is possible. Any suggestions?

---

<div class="post-metadata">

**Author:** ![dax](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dax/32/244677_2.png) [@dax](https://meta.discourse.org/u/dax)\
**Post date:** [2019年六月6日 13:17 UTC](https://meta.discourse.org/t/dialogue-text-formatting-instead-of/119658/4 "2019-06-06T13:17:00Z")

</div>

For old posts you can use the rails c console to replace `-` with `\-`

`rake posts:remap["find","replace"]`

but you need to use regex to change only `-` (followed by an empty space?) and not for example `-` used in links or in other situations.

> **[Rubular](https://rubular.com/)**
>
> Ruby-based regular expression editor/tester

> **[Mastering Ruby Regular Expressions](https://www.rubyguides.com/2015/06/ruby-regex/)**
>
> Ruby regular expressions (ruby regex for short) help you find specific patterns inside strings, with the intent of extracting data for further processing. Two common use cases for regular expressions include validation & parsing. For example: ...

---

<div class="post-metadata">

**Author:** ![calebs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/calebs/32/148838_2.png) [@calebs](https://meta.discourse.org/u/calebs)\
**Post date:** [2019年六月6日 14:21 UTC](https://meta.discourse.org/t/dialogue-text-formatting-instead-of/119658/5 "2019-06-06T14:21:57Z")

</div>

I don’t wanna sound negative, but I have absolutely no idea how this is going to work. I have 0 experience with programming, coding and all that.

Just need a simple dialogue with dashes as it is in books and websites. I just don’t feel like hiring a developer for something not so big.

---

<div class="post-metadata">

**Author:** ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)\
**Post date:** [2019年六月6日 14:28 UTC](https://meta.discourse.org/t/dialogue-text-formatting-instead-of/119658/6 "2019-06-06T14:28:57Z")

</div>

You’re talking about overriding the formatting engine and breaking how part of markdown is rendered out, so while it doesn’t seem like a big change, it’s not something that can be easily altered, it’s certainly more than a line or two of code.

If you don’t want to change Discourse, then your best bet would be to adopt a different syntax; one which doesn’t collide with Markdown. Have you looked into alternatives? Scriptwriting for example doesn’t prepend lines of dialog with dashes.

---

<div class="post-metadata">

**Author:** ![tomtjes](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tomtjes/32/131271_2.png) [@tomtjes](https://meta.discourse.org/u/tomtjes)\
**Post date:** [2019年六月6日 15:30 UTC](https://meta.discourse.org/t/dialogue-text-formatting-instead-of/119658/7 "2019-06-06T15:30:59Z")

</div>

Turns out, your best bet is probably to encourage your community to use a new standard. You could help them by creating a topic template in the category setting.  
Aside from the backslash a couple other options:

**Code blocks**  
Use three backticks ``` in a single line before and after the dialogue.

```plaintext
- Hello, how are you?
- I’m pretty good, thanks.

```

**Use two dashes**  
`-- Hello, how are you?`  
– Hello, how are you?  
`-- I’m pretty good, thanks.`  
– I’m pretty good, thanks.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [2022年十一月7日 04:36 UTC](https://meta.discourse.org/t/dialogue-text-formatting-instead-of/119658/8 "2022-11-07T04:36:03Z")

</div>



---

<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:** [2022年十一月7日 05:19 UTC](https://meta.discourse.org/t/dialogue-text-formatting-instead-of/119658/9 "2022-11-07T05:19:39Z")

</div>


