Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monospace Link Roundtrip #164

Closed
jolanglinais opened this issue Feb 6, 2020 · 8 comments
Closed

Monospace Link Roundtrip #164

jolanglinais opened this issue Feb 6, 2020 · 8 comments
Assignees

Comments

@jolanglinais
Copy link
Member

Describe the bug
Monospace links are broken in the roundtrip

Screenshots


Screen Shot 2020-02-06 at 2 10 42 PM


Additional context
This may need to be moved to markdown-editor?

@jeromesimeon
Copy link
Member

I'm not sure I understand this issue. What's a monospace link?

@jeromesimeon
Copy link
Member

I'm not sure I understand this issue. What's a monospace link?

The commonmark spec has a notion of link, but nothing font-specific. https://spec.commonmark.org/0.29/#links

@jolanglinais
Copy link
Member Author

Now that I think about it, maybe this is more of an issue for the markdown-editor. This is what I mean by monospace link:

Screen Shot 2020-02-10 at 8 55 47 AM

@jeromesimeon
Copy link
Member

This seems to be parsed and round-trip properly.

bash-3.2$ cat codeinlink.md 
this is a [`monospace link`](https://google.com)
bash-3.2$ markus normalize --sample codeinlink.md --output test.md
11:18:44 AM - info: Creating file: test.md
11:18:44 AM - info: 
this is a [`monospace link`](https://google.com "")

@jolene, what is the error you are getting?

@jeromesimeon
Copy link
Member

Some more investigation, the Slate transform does lose the inline code:

bash-3.2$ markus normalize --sample codeinlink.md --output test.md --slate 
11:29:28 AM - info: Creating file: test.md
11:29:28 AM - info: 
this is a [monospace link](https://google.com "")

@jeromesimeon
Copy link
Member

This issue isn't specific to code inlines inside links, but to anything other than a text node inside a link.

For instance, with emphasis:

bash-3.2$ cat test/data/linkem.md 
this is a [*code link*](https://google.com)
bash-3.2$ ../markdown-cli/index.js normalize --sample test/data/linkem.md --slate 
12:20:29 PM - info: 
this is a [](https://google.com "")

@jeromesimeon
Copy link
Member

This should be fixed with #171

bash-3.2$ cat test/data/linkem.md 
this is a [*code link*](https://google.com)
bash-3.2$ ../markdown-cli/index.js normalize --sample test/data/linkem.md --slate 
12:21:23 PM - info: 
this is a [*code link*](https://google.com "")
bash-3.2$ more test/data/linkcode.md 
more test/data/linkcode.md 
this is a [`code link`](https://google.com)

this is a `code snippet`
bash-3.2$ ../markdown-cli/index.js normalize --sample test/data/linkcode.md --slate 
12:22:25 PM - info: 
this is a [`code link`](https://google.com "")

this is a `code snippet`

@jeromesimeon
Copy link
Member

A more fancy test:

bash-3.2$ more test/data/linkmixed.md 
[This is a *link* with `code` and **bold**](http://google.com)
bash-3.2$ ../markdown-cli/index.js normalize --sample test/data/linkmixed.md --slate 
12:30:04 PM - info: 
[This is a *link* with `code` and **bold**](http://google.com "")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants