从 Discord 复制粘贴到 Discourse 破坏换行

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 个赞

FYI Discord Bot Construction Kit 🤖 有一个消息复制命令,它不仅能复制消息,还能将消息归属给正确的人。

1 个赞

在我看来,这看起来像是一个 Discord 的 bug。

HTML 会忽略换行符,如果你想要换行符,你应该使用 <br> 或者将内容放在 <p> 中。

我以为我们支持一个 ninja SHIFT-CTRL-P,可以从文本粘贴而不是 HTML → Markdown。

1 个赞

在我粘贴剪贴板信息后,我也这么想了,因此也在那里提交了一个错误报告(#43764105)。我猜他们生成的 HTML 格式不正确,所以我们不能指望 Discourse 能处理它。请随时“关闭”这个错误主题。

感谢您告知我有关神奇粘贴的信息!:slight_smile:

1 个赞

供您参考:他们怪你 :wink:

嗨 Pod,

感谢您抽出宝贵时间与我们联系!

我们理解您对从 Discord 复制和粘贴时 HTML 格式的担忧。

我们已审查您的问题,发现不同的应用程序处理复制的多行文本方式不同。有些会保留原始的行距(如记事本或 Google 表格),而有些则不会(如您注意到的 Google Docs 或 Discourse)。

我们的目标是确保我们的功能在多个平台和应用程序上都能正常运行。但是,由于每个平台和应用程序管理这些功能的方式不同,这可能会带来挑战。

希望这能解释清楚!但如果您还需要其他帮助,请告诉我!

此致,
Nico

看起来 Discord 或 Discourse 不会改变,所以我想我只能记住,如果我从 Discord 复制任何内容,我需要按 CTRL+SHIFT+P 进行神奇粘贴,并且这个 bug 在这里以防其他人遇到此问题。

(我尝试将他们的 CF_HTML 内容保存到文件中并查看它,在 Firefox、Chrome、Edge 中它都有换行符。我对 Web 开发了解不多,不知道他们发出的内容是否是“有效”的 HTML,或者仅仅是浏览器会勉强正确渲染的 HTML,因为它将其解释为 HTML 1.1 或其他什么东西)

1 个赞