دمج النص المنسق الملصق => كتلة التعليمات البرمجية عندما يكون هناك مسافة فقط كفاصل

Saw an issue with the wrong use of preformatted text in Anki Forums, and thought if Discourse could merge them automatically in the new composer then it would help users and devs when dealing with debug informations


Actual behavior (From post below):

b2d2) (ao)Python 3.13.5 Qt 6.9.1 PyQt 6.9.1Platform: Windows-11-10.0.26100-SP0

Traceback (most recent call last):File “C:\Users\lejla\AppData\Local\AnkiProgramFiles.venv\Lib\site-packages\aqt\webview.py”, line 188, in cmdreturn json.dumps(self.onCmd(str))~~~~~~~~~~^^^^^File “C:\Users\lejla\AppData\Local\AnkiProgramFiles.venv\Lib\site-packages\aqt\webview.py”, line 275, in _onCmdreturn self._onBridgeCmd(str)~~~~~~~~~~~~~~~~~^^^^^File “C:\Users\lejla\AppData\Local\AnkiProgramFiles.venv\Lib\site-packages\aqt\webview.py”, line 800, in _onBridgeCmdhandled, result = gui_hooks.webview_did_receive_js_message(~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^(False, None), cmd, self._bridge_context^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^)^File “C:\Users\lejla\AppData\Local\AnkiProgramFiles.venv\Lib\site-packages_aqt\hooks.py”, line 5543, in callhandled = filter(handled, message, context)File “C:\Users\lejla\AppData\Roaming\Anki2\addons21\1898790263\contanki.py”, line 146, in on_receive_messagefuncsfunc~~~~~~~~~~~^^^^^^^File “C:\Users\lejla\AppData\Roaming\Anki2\addons21\1898790263\contanki.py”, line 165, in if_connected_wrapperfunc(self, *args, **kwargs)~~~~^^^^^^^^^^^^^^^^^^^^^^^File “C:\Users\lejla\AppData\Roaming\Anki2\addons21\1898790263\contanki.py”, line 177, in pollaxes = [float(axis) for axis in input_axes.split(“,”)]~~~~~^^^^^^ValueError: could not convert string to float: ‘’

===Add-ons (active)===(add-on provided name [Add-on folder, installed at, version, is config changed])Contanki - Controller Support for Anki beta [‘1898790263’, 2024-02-29T19:22, ‘v1.0.2’, mod]Image Occlusion Enhanced [‘1374772155’, 2022-04-09T02:15, ‘None’, ‘’]

===IDs of active AnkiWeb add-ons===1374772155 1898790263

===Add-ons (inactive)===(add-on provided name [Add-on folder, installed at, version, is config changed])

Expected behavior:

Anki 25.07.5 (7172b2d2) (ao)Python 3.13.5 Qt 6.9.1 PyQt 6.9.1Platform: Windows-11-10.0.26100-SP0

Traceback (most recent call last):File “C:\Users\lejla\AppData\Local\AnkiProgramFiles.venv\Lib\site-packages\aqt\webview.py”, line 188, in cmdreturn json.dumps(self.onCmd(str))~~~~~~~~~~^^^^^File “C:\Users\lejla\AppData\Local\AnkiProgramFiles.venv\Lib\site-packages\aqt\webview.py”, line 275, in _onCmdreturn self._onBridgeCmd(str)~~~~~~~~~~~~~~~~~^^^^^File “C:\Users\lejla\AppData\Local\AnkiProgramFiles.venv\Lib\site-packages\aqt\webview.py”, line 800, in _onBridgeCmdhandled, result = gui_hooks.webview_did_receive_js_message(~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^(False, None), cmd, self._bridge_context^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^)^File “C:\Users\lejla\AppData\Local\AnkiProgramFiles.venv\Lib\site-packages_aqt\hooks.py”, line 5543, in callhandled = filter(handled, message, context)File “C:\Users\lejla\AppData\Roaming\Anki2\addons21\1898790263\contanki.py”, line 146, in on_receive_messagefuncsfunc~~~~~~~~~~~^^^^^^^File “C:\Users\lejla\AppData\Roaming\Anki2\addons21\1898790263\contanki.py”, line 165, in if_connected_wrapperfunc(self, *args, **kwargs)~~~~^^^^^^^^^^^^^^^^^^^^^^^File “C:\Users\lejla\AppData\Roaming\Anki2\addons21\1898790263\contanki.py”, line 177, in pollaxes = [float(axis) for axis in input_axes.split(“,”)]~~~~~^^^^^^ValueError: could not convert string to float: ‘’

===Add-ons (active)===(add-on provided name [Add-on folder, installed at, version, is config changed])Contanki - Controller Support for Anki beta [‘1898790263’, 2024-02-29T19:22, ‘v1.0.2’, mod]Image Occlusion Enhanced [‘1374772155’, 2022-04-09T02:15, ‘None’, ‘’]

===IDs of active AnkiWeb add-ons===1374772155 1898790263

===Add-ons (inactive)===(add-on provided name [Add-on folder, installed at, versi



If there is text separating the preformatted text, then it should not be merged

Edit: There isn’t a code lenght in code block so it streches indefinitely, there should be a default value which is configurable to Admins (speaking as a user, not sure if there is a setting already present)