Discourse يحول القائمة المفصولة بعلامات جدولة المنسوخة إلى جدول تلقائيًا

عند نسخ النص من الصفحة عن طريق تحديده بالسحب، أحصل على:

ولكن عند نسخه باستخدام زر النسخ:

أحصل بشكل صحيح على النص المتوقع فقط عند اللصق.

محتويات الحافظة باستخدام زر “النسخ” هي:

TEXT:
b'```sh\n\tsystemctl reboot\n\t```'
text/plain:
b'```sh\n\tsystemctl reboot\n\t```'

محتويات الحافظة عن طريق تحديده بالسحب على الصفحة هي:

TEXT:
b'\t```sh\n\tsystemctl reboot\n\t```'
text/html:
b'<span style="color: rgb(199, 199, 199); font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace; font-size: 17.008px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(60, 60, 60); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">\t```sh\n\tsystemctl reboot\n\t```</span>'
text/plain:
b'\t```sh\n\tsystemctl reboot\n\t```'

ربما تكون علامة الجدولة في بداية كل سطر هي التي تسبب الارتباك - ربما إذا كان العمود الأول فارغًا دائمًا عند تحليل محتويات الحافظة، فلن نعاملها كقائمة.

يبدو هذا وضعًا مرضيًا بعض الشيء - هل هناك موقف طبيعي يحدث فيه ذلك؟ عادةً لن تكون هناك علامات جدولة في المنشورات.

بالنسبة للكمبيوتر، تبدو تمامًا مثل جدول مفصول بعلامات جدولة مع عمود أول فارغ.

7 إعجابات