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

[DownView] Support for internal links? #93

Closed
1 task done
antonjazz opened this issue Jun 30, 2018 · 4 comments
Closed
1 task done

[DownView] Support for internal links? #93

antonjazz opened this issue Jun 30, 2018 · 4 comments
Labels
DownView Issues specific to DownView, the webview renderer feature request

Comments

@antonjazz
Copy link

Please help prevent duplicate issues before submitting a new one:

  • I've searched other open/closed issues for duplicates before opening up this new issue.

Report

What did you do?

I'm trying to use Down on markdown with internal links. An example is this link to text at the bottom of this page.

I tried multiple standard ways of specifying the link and destination anchor, including:

  • [link text](#anchorname) and <a name="anchorname"></a>
    (This complies with the CommonMark spec so it should work, right?)
  • [link text](#section-name) and ## Section Name
    (This is a common standard when linking to a section, though it's not part of CommonMark standard.)

What did you expect to happen?

I expected the links to function. They function here and the first one functions on the commonmark dingus.

What happened instead?

The links did nothing.


PS here is the destination of the link I used as an example earlier on.

@iwasrobbed
Copy link
Collaborator

Happy to accept a pull request with this feature 👍

@antonjazz
Copy link
Author

Ah, I wish I were at that point! I'm brand new to github and almost brand new to iOS.
I appreciate the work you're doing and I look forward to the time when I'll be able to help contribute!

As far as this issues goes, I was surprised to find that not even
<a href="#anchor">linking text</a> and <a name="anchor">linked-to text</a>
worked when I ran it through Down. Since that's just standard HTML, which I thought was passed through unchanged, I figured that there was some special link processing going on that you might be able to tell me about… I guess not?

Thank you, in any case—for this and for the great cocoapod!

Anton

@antonjazz
Copy link
Author

antonjazz commented Jul 5, 2018

Update: I looked at the HTML code generated from the Markdown by Down and its correct for internal links, so the problem is not in the conversion.

I thought that perhaps the issue was that I needed to set openLinksInBrowser: false in the initializer call. Not only did that not make the internal links function, it didn't seem to change any behavior at all; external links still open in Safari.

@iwasrobbed iwasrobbed added the DownView Issues specific to DownView, the webview renderer label Nov 10, 2018
@iwasrobbed iwasrobbed changed the title Support for internal links? [DownView] Support for internal links? Nov 10, 2018
@iwasrobbed
Copy link
Collaborator

Going to close this out as it hasn't garnered much attention from the community in terms of up votes over the past year. Feel free to open a PR with these changes if you'd like it added

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DownView Issues specific to DownView, the webview renderer feature request
Projects
None yet
Development

No branches or pull requests

2 participants