Copiar + Colar texto do Discord no Discourse desconfigura as quebras de parágrafo

I wish to copy and paste this highlighted text from Discord into Discourse:

Here is what it looks like if I do so:

Spitz 07/03/2024 18:43

Hell-o, Divers! I wanted to take a moment this afternoon to let you all know that we’ve heard your concerns over the last few days regarding enemy spawns, enemy armor, and the ability to kill these enemies. As we’ve said before, our teams are always taking in player feedback and looking at how we can tweak the game to ensure that it is fair, enjoyable and provides the best experience for everyone. I can confirm that we’re currently looking at changes to the spawn rates and health pools of heavy enemies, and will be attempting to spread them out more to prevent large spikes of tougher mobs appearing at the same time, as well as making them a bit easier to bring down. This change should go out in a future hotfix - no date as of yet. In addition, we forgot to mention (oops) that the EAT-17 and Recoilless Rifle no longer suffer from a 50% damage decrease when hitting an armored enemy at a ‘glance angle’ that deflects the shot. Combined with the upcoming adjustment to health and spawn rates, this should make the larger enemies a bit less common, instead spawning more ‘chaff’ enemies to support them, and should allow players to bring these enemies down with a single well-placed shot. Hopefully this leads to less instances of endless kiting and players being left without any effective weaponry to kill harder enemies. Thanks as always for your patience!

It’s just one big paragraph.

If I instead first paste it into a text editor (e.g. notepad) and then copy+paste from there it looks like this:

Spitz — 07/03/2024 18:43
Hell-o, Divers! I wanted to take a moment this afternoon to let you all know that we’ve heard your concerns over the last few days regarding enemy spawns, enemy armor, and the ability to kill these enemies. As we’ve said before, our teams are always taking in player feedback and looking at how we can tweak the game to ensure that it is fair, enjoyable and provides the best experience for everyone.

I can confirm that we’re currently looking at changes to the spawn rates and health pools of heavy enemies, and will be attempting to spread them out more to prevent large spikes of tougher mobs appearing at the same time, as well as making them a bit easier to bring down. This change should go out in a future hotfix - no date as of yet.

In addition, we forgot to mention (oops) that the EAT-17 and Recoilless Rifle no longer suffer from a 50% damage decrease when hitting an armored enemy at a ‘glance angle’ that deflects the shot. Combined with the upcoming adjustment to health and spawn rates, this should make the larger enemies a bit less common, instead spawning more ‘chaff’ enemies to support them, and should allow players to bring these enemies down with a single well-placed shot. Hopefully this leads to less instances of endless kiting and players being left without any effective weaponry to kill harder enemies.

Thanks as always for your patience!

Which is what I want, as it preserves then paragraph breaks.

I don’t know if Discourse, Discord, or Windows is to blame in this process. But it happens. I tested is in the latest Firefox and latest MS Edge, and the same thing happens, so I don’t think it’s the browser.

If I use something like ClipView or InsideClipboard I can see the following.

1, 7, 13 all do what you expect:

49412 HTML looks like this

Version:0.9
StartHTML:0000000185
EndHTML:0000012902
StartFragment:0000000221
EndFragment:0000012866
SourceURL:https://discord.com/channels/1102970375731691612/1102974129734434919
<html>
<body>
<!--StartFragment--><h3 class="header__39b23" aria-labelledby="message-username-1215369280980394024 message-timestamp-1215369280980394024" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: normal; font-family: &quot;gg sans&quot;, &quot;Noto Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: 16px; vertical-align: baseline; display: block; position: relative; line-height: 1.375rem; min-height: 1.375rem; color: var(--text-muted); white-space: break-spaces; overflow: hidden; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(49, 51, 56); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><span id="message-username-1215369280980394024" class="headerText_f47574 hasRoleIcon_b0c680" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;"><span class="username_d30d99 desaturateUserColors_b72bd3 clickable_d866f1" aria-expanded="false" role="button" tabindex="0" style="margin: 0px; padding: 0px; border: 0px; font-weight: 500; font-style: inherit; font-family: inherit; font-size: 1rem; vertical-align: baseline; outline: 0px; line-height: 1.375rem; color: rgb(155, 89, 182); display: inline; position: relative; overflow: hidden; flex-shrink: 0;">Spitz</span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;"><span class="" role="button" tabindex="0" style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;"><img alt="" aria-label="Role icon, Community Manager" class="roleIcon__59ca1 roleIcon_d491aa clickable__08c77" height="20" src="upload://7PldHMXYonxiDX9vkSjyhksRtWN.webp" width="20" style="margin: 0px 0px 0px 0.25rem; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: top; display: inline-block; overflow: hidden; object-fit: contain; cursor: pointer; position: relative; top: 1px; height: calc(4px + 1rem); width: calc(4px + 1rem); text-indent: -9999px;"></span></span></span><span class="timestamp_cdbd93 timestampInline__470e0" style="margin: 0px 0px 0px 0.25rem; padding: 0px; border: 0px; font-weight: 500; font-style: inherit; font-family: inherit; font-size: 0.75rem; vertical-align: baseline; outline: 0px; display: inline-block; height: 1.25rem; cursor: default; pointer-events: auto; line-height: 1.375rem; color: var(--text-muted);"><time aria-label="7 March 2024 18:43" id="message-timestamp-1215369280980394024" datetime="2024-03-07T18:43:37.055Z"><i class="separator__3f416" aria-hidden="true" style="position: absolute; opacity: 0; display: inline-block; font-style: normal;"> — </i>07/03/2024 18:43</time></span></h3><div id="message-content-1215369280980394024" class="markup_a7e664 messageContent__21e69" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: calc(-1*var(--custom-message-margin-left-content-cozy)); padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: var(--custom-message-margin-left-content-cozy); border: 0px; font-weight: 400; font-style: normal; font-family: &quot;gg sans&quot;, &quot;Noto Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: 16px; vertical-align: baseline; outline: 0px; line-height: 1.375rem; white-space: break-spaces; overflow-wrap: break-word; user-select: text; color: var(--text-normal); text-indent: 0px; position: relative; overflow: hidden; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: left; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(49, 51, 56); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">Hell</span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">-o</span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">, Divers</span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">! I wanted to take a moment this afternoon to let you all know that we</span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">'ve heard your concerns over the last few days regarding enemy spawns</span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">, enemy armor</span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">, and the ability to kill these enemies</span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">. As we</span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">'ve said before</span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">, our teams are always taking in player feedback and looking at how we can tweak the game to ensure that it is fair</span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">, enjoyable and provides the best experience for everyone</span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">. </span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">

I can confirm that we</span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">'re currently looking at changes to the spawn rates and health pools of heavy enemies</span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">, and will be attempting to spread them out more to prevent large spikes of tougher mobs appearing at the same time</span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">, as well as making them a bit easier to bring down</span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">. This change should go out in a future hotfix </span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">- no date as of yet</span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">.</span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">

In addition</span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">, we forgot to mention </span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">(oops</span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">) that the EAT</span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">-17 and Recoilless Rifle no longer suffer from a 50</span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">% damage decrease when hitting an armored enemy at a </span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">'glance angle</span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">' that deflects the shot</span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">. Combined with the upcoming adjustment to health and spawn rates</span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">, this should make the larger enemies a bit less common</span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">, instead spawning more </span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">'chaff</span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">' enemies to support them</span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">, and should allow players to bring these enemies down with a single well</span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">-placed shot</span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">. Hopefully this leads to less instances of endless kiting and players being left without any effective weaponry to kill harder enemies</span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">.</span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">

Thanks as always for your patience</span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline; outline: 0px;">!</span></div><!--EndFragment-->
</body>
</html>

So I think it might be Discord’s fault for not putting in the

? Or is it your/browser’s fault for taking the HTML?

1 curtida

FYI Discord Bot Construction Kit 🤖 tem um comando de cópia de mensagem que vai além de apenas copiar a mensagem e também atribuirá a mensagem à pessoa certa.

1 curtida

Isso parece um bug do Discord para mim.

O HTML “come” novas linhas no café da manhã, se você quiser novas linhas, deve usar <br> ou manter as coisas em um <p>

Eu pensei que apoiávamos um SHIFT-CTRL-P ninja que cola de texto vs HTML → Markdown.

1 curtida

Depois que postei as informações da área de transferência, pensei o mesmo, então também registrei um bug lá (#43764105). Acho que o HTML que eles estão produzindo não está bem formado, então não podemos esperar que o Discourse lide com isso. Sinta-se à vontade para “fechar” este tópico de bug.

Obrigado por me informar sobre a colagem mágica! :slight_smile:

1 curtida

FYI: Eles culpam você :wink:

Olá Pod,

Obrigado por dedicar um tempo para entrar em contato conosco!

Entendemos sua preocupação com o formato HTML ao copiar e colar do Discord.

Revisamos seu problema e parece que diferentes aplicativos lidam com texto multilinha copiado de maneiras diferentes. Alguns mantêm o espaçamento de linha original (como o Bloco de Notas ou o Google Spreadsheet), enquanto outros não (como o Google Docs ou o Discourse, como você observou).

Nosso objetivo é garantir que nossas funcionalidades funcionem em várias plataformas e aplicativos. No entanto, como cada plataforma e aplicativo gerencia essas funções de maneira diferente, isso pode ser desafiador.

Espero que isso resuma tudo! Mas me avise se precisar de mais alguma coisa!

Abraços,
Nico

Não parece que o Discord ou o Discourse mudarão, então acho que terei que me lembrar de fazer CTRL+SHIFT+P para colar magicamente se eu copiar do Discord novamente, e este bug pode estar aqui caso alguém mais encontre o problema.

(Tentei salvar o conteúdo CF_HTML deles em um arquivo e olhar para ele, e ele tem as quebras de linha no Firefox, Chrome, Edge. Não sei o suficiente sobre desenvolvimento web para saber se o que eles estão emitindo é HTML “válido”, ou simplesmente HTML que um navegador renderizará relutantemente corretamente porque o está interpretando como HTML 1.1 ou algo assim)

1 curtida