nobiot / md-roam

Use Org-roam with markdown files by adding Md-roam as a plug-in. Mix org and markdown files in a single Org-roam database.
GNU General Public License v3.0
331 stars 14 forks source link

"@" symbol in .md file leads to broken links with MDRoam and OrgRoamUI? #79

Open xia7139 opened 1 year ago

xia7139 commented 1 year ago

When md file contains "@" symbol, for example:

---
title: Java Language
id: 2023-06-05T010809
category: 
---
# Test
@foo
@bar

In OrgRoamUI, it renders like a broken link, as follows:

Is it a bug?

nobiot commented 1 year ago

Sorry what is the problem exactly? Is it that the line in the browser page appears to be disconnected?

nobiot commented 1 year ago

In OrgRoamUI, it renders like a broken link, as follows:

Okay, so I assume it is an UI issue on the browser. You would need ask the org-roam-ui project about this. It could be an issue with the UI javascript framework, or even the browser you use, but I have no clue. md-roam does not touch the UI on the browser.

xia7139 commented 1 year ago

Sorry, the md file above should not be a good example. The fact is even there is a "@" symbol in the code block of md file. It will render like a disconnected link. Another md file:

---
title: Java Language
id: 2023-06-05T010809
category: 
---
# Test
there is a code block:
`java
  public class Main {
      /**
     @param args, parameter of main.
       ,*/
       @AnnotationTest("TestMain")
      public static void main(String[] args) {
      System.out.print("hello, world");
      }
  }
`

It would render like: image This would be common in java code blocks. It is not a node. It is just a java syntax code block.

nobiot commented 1 year ago

Thanks. If I understand this correctly, it's a clash between Java code and Pandoc syntax for the use of the "@" mark.

I do not use Java at all so it is unlikely that I can come up with a good solution to achieve both in md-roam. Let me know if you have a good idea; I'd welcome a PR.

As an alternative, if you do not use Pandoc citations, you can easily remove this feature by commenting out the following line:

https://github.com/nobiot/md-roam/blob/main/md-roam.el#L324