nobiot/md-roam

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

xia7139 opened this issue · 4 comments

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

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

nobiot commented

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.

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

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