Yes, I know that. What I’m saying is, I don’t think most users know “paste as plain text” is even an option. It pretty much negates the usefulness of code blocks.
You can turn formatted pasting off globally in your site settings if you are a site owner.
Thanks for letting me know. I’m not the site owner, but I’ll bring up that option with the site owner and see what they think.
EDIT: @codinghorror Am I correct in assuming that there is no user-level setting?
I have been running into this too. Don’t know if it is a recent development but just started noticing it. I use discourse to reply to email often. When I do, I hit reply in the email and then copy and paste the entire email text into my discourse message. It recognizes one level of quoting correctly but encodes the second and third level. So I have to first paste into a plain text editor and do global search and replace, then edit, to get it to look as expected in discourse.
use ctrl+shift+v, it is your friend ![]()
If I want to lose all the other formatting too, then yes.
I will try this out next time and see how it turns out.
Thanks.
What about when you’re responding from your phone? At least iPhone doesn’t have the option to paste in plaintext.
Does iPhone retain formatting when copying? I’m not sure it even does?
It does. I just tried it.
Perhaps it would make sense to add a button on the reply menu for doing a plain text paste? Though space there is already a little tight on my iPhone 8…
@seanblue @tobiaseigen thanks for the report. I will definitely try to improve this. But it’s not in my current priority list.
I agree, a plain text menu option would be great when I’m working from my phone.
投稿全体を読もうとしましたが、最初の数件の後は要約して読むようになりました。
また、以下のオンライン変換ツールを試しましたが、\ が \\ に変換されなかったため、コード\text は次のように表示されてしまいます。
\+ exist
A \= b
変換後の出力:
+ exist
A = b
当サイト(SWI-Prolog)は、プログラミング言語 Prolog の SWI-Prolog に関するもので、多くの投稿に Prolog のソースコードが含まれています。Prolog は「and」「or」「not」という 3 つの基本的な論理演算子に基づいた論理プログラミング言語であり、「not」は一般的な演算子と組み合わせて使われる場合、通常 \ という文字で表されます(例:\=/2 や \+/1)。一方、Markdown では \ が エスケープ文字 として使われるため、コードサンプル内ではなくインラインで貼り付けられた演算子は、Markdown 変換時に \ がエスケープ文字と誤認識されて消費され、\= や \+ ではなく = や + として表示されてしまうことがよくあります。
これを修正することはできますか?![]()
コードブロックに貼り付ける必要があるため、バッククォートを3回入力し、Enterキーを押してから、その後貼り付けてください。
ありがとうございます。
ほとんどのユーザーは、コードブロックの両端を ```prolog と ``` で囲んでいますが、そうでない人のために私が 投稿 に記載した通りです。
問題は、それが インライン のテキストの場合です。ご存知の通り、多くのユーザーは投稿内容を校正せず、または校正しても欠落した \ に見落としがちです。![]()
SWI-Prolog のユーザー向けに、投稿 の詳細を記載します。
インラインテキストで \ 文字を使用する場合(例:\= や \+)、それは = や + に変換されてしまいます。これはおそらく意図した動作ではないでしょう。Discourse は貼り付けられたテキストを HTML に変換しようとしていますが、Markdown も使用しており、Markdown では \ がエスケープ文字として機能します。
間違った例:= と +。
インラインコードの場合は、テキストを ` で囲んでください。例:`\=` または `\+`。これらはそれぞれ \= または \+ として表示されます。
あるいは、
\ を二重に使用してください。例:\\= または \\+ を貼り付けると、\= または \+ として表示されます。
ただし、複数の行のコードがある場合は、コードセクションを ```prolog と ``` で囲んでください。そうすると、Prolog のソースコード変換器によってコードセクションが変換され、\ はそのまま残されます。
A \= b.
\+ true.
私がここへコピーして貼り付けた際にも、内容が正しいことを確認するために、元のテキストではなく元の HTML からコピーし直す必要がありました。
これを完了としてクローズします!この機能を実装してくださった @vinothkannans さん、素晴らしい仕事です。
今後の改善点は、新しいバグや機能のトピックで進めてください。