GithubHelp home page GithubHelp logo

Comments (10)

wxiaoguang avatar wxiaoguang commented on May 16, 2024

I think the fix could be like this: Fix orgmode link resolving #29024

ps: your content ([[GPLv3 Badge][file:https://...]])seems not matching orgmode syntax: https://orgmode.org/org.html#Link-Format-1 , the format is [[LINK][DESCRIPTION]], so maybe you would like to use [[file:https://...][GPLv3 Badge]] or [[file:https://...][file:https://...]] instead?

from gitea.

wxiaoguang avatar wxiaoguang commented on May 16, 2024

@KN4CK3R sorry I didn't notice that this issue has been assigned to you. If you have been working on this and/or have other approaches, I will close my PR. 🙏

from gitea.

arifer612 avatar arifer612 commented on May 16, 2024

ps: your content ([[GPLv3 Badge][file:https://...]])seems not matching orgmode syntax: https://orgmode.org/org.html#Link-Format-1 , the format is [[LINK][DESCRIPTION]], so maybe you would like to use [[file:https://...][GPLv3 Badge]] or [[file:https://...][file:https://...]] instead?

Hi, the syntax is actually as intended.

Org interprets whatever is in the DESCRIPTION field as what should be displayed to the user, and whatever is in the LINK field as the target when clicked on. In this, case, we want to display an image at https://..., so that goes into the DESCRIPTION field; and say for example if we want the user to be directed to the LICENSE file, that's what goes into the LINK field. You can refer to an example repository here that does just this.

from gitea.

wxiaoguang avatar wxiaoguang commented on May 16, 2024

You can refer to an example repository here that does just this.

Let's see this example:

[[LICENSE][https://img.shields.io/badge/license-GPL_3-green.svg]]

It is rendered as:

<a href="/arifer612/spacemacs-literate-layering/blob/master/LICENSE">
    <img src="https://....(the svg)" alt="https://img.shields.io/badge/license-GPL_3-green.svg">
</a>

So I think my understanding is right: [LICENSE] is rendered as a link to /arifer612/spacemacs-literate-layering/blob/master/LICENSE


If you have new cases, could you elaborate them to show the expected output for your cases?

from gitea.

arifer612 avatar arifer612 commented on May 16, 2024

I've just commented on the PR, which gives a different example for it:
#29024 (comment)

from gitea.

arifer612 avatar arifer612 commented on May 16, 2024

Let's see this example:

[[LICENSE][https://img.shields.io/badge/license-GPL_3-green.svg]]

What should be tested, however, is [[LICENSE][file:https://img.shields.io/badge/license-GPL_3-green.svg]].

from gitea.

wxiaoguang avatar wxiaoguang commented on May 16, 2024

I've just commented on the PR, which gives a different example for it:

According to the newly added test case, everything works as expected. #29024 (comment)

What should be tested, however, is [[LICENSE][file:https://img.shields.io/badge/license-GPL_3-green.svg]].

Relative links are covered by

image

image

ps: actually, the "relative link handling" is not in this PR's scope. Because, the relative link logic is managed by the common framework (which is for both markdown/orgmode). So if there is any relative link bug, it should be handled from the framework level first.

from gitea.

arifer612 avatar arifer612 commented on May 16, 2024

If it's fixed, then all is good, thanks!

Replying to the P.S., the issue here isn't about the relative link handling, I only brought that up because you mentioned that the syntax used was incorrect. Gitea resolves relative links perfectly fine as it is now.

from gitea.

KN4CK3R avatar KN4CK3R commented on May 16, 2024

@KN4CK3R sorry I didn't notice that this issue has been assigned to you. If you have been working on this and/or have other approaches, I will close my PR. 🙏

Everything fine, didn't find the time.

from gitea.

github-actions avatar github-actions commented on May 16, 2024

Automatically locked because of our CONTRIBUTING guidelines

from gitea.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.