vsch / idea-multimarkdown

Markdown language support for IntelliJ IDEA.
https://plugins.jetbrains.com/plugin/7896-markdown-navigator
Apache License 2.0
812 stars 129 forks source link

Disable link processing when pasting #882

Open neochief opened 3 years ago

neochief commented 3 years ago

Hi!

Today I started to experience strange behavior that I didn't experience before (maybe because I was lucky to never trigger it). When I paste something, the plugin pastes some sort of the link instead of a plain text. For instance:

  1. I copy the word "Observer" (from a plain-text input).
  2. I paste it into my markdown file.
  3. I get this instead of the word "Observer":
[index.ts: Lines 132-143](file:///Users/neochief/www/dev.refactoring.guru/resources/examples/design-patterns-typescript/src/Observer/Conceptual/index.ts#L132-L143)

When I checked the linked TypeScript file, I see the following:

/**
 * EN: The Observer interface declares the update method, used by subjects.
 *
 * RU: Интерфейс Наблюдателя объявляет метод уведомления, который издатели
 * используют для оповещения своих подписчиков.
 */
interface Observer {
    // EN: Receive update from subject.
    //
    // RU: Получить обновление от субъекта.
    update(subject: Subject): void;
}

I understand that this has something to do with the link processing, but I never use it, and I can't see to figure out how to disable this behavior completely. Can you please suggest some workaround?

I'm using PHPStorm 2020.1.1 and MN 30.0.197.72.Legacy.

unix commented 3 years ago

I was also plagued by this problem and have since disabled this feature on the following configuration:

I try to disable option: Preferences / Languages & Frameworks / Markdown / Copy Selection Reference, but this option doesn't actually work.

I'm not quite sure if this feature is useful, but it is advisable to set it to off by default. (at least for me, copying and getting plain text is an expected thing)

neochief commented 3 years ago

@unix, thank you for your suggestion, mate!