Comments (10)
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.
@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.
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.
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.
I've just commented on the PR, which gives a different example for it:
#29024 (comment)
from gitea.
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.
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
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.
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 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.
Automatically locked because of our CONTRIBUTING guidelines
from gitea.
Related Issues (20)
- Gitea 1.21 failing to build on musl-based distributions as of musl 1.2.4.
- [Community Feedback] Using a What-you-see-is-what-you-get markdown editor or not HOT 3
- Performance issue on pulls list API endpoint with lots of PR's
- Disallow deeply nested CSS selectors HOT 1
- When saving an LFS PDF file on Minio, the PDF preview may fail when SERVE_DIRECT is set to true.
- Gitea 1.22 detected as virus by windows defender HOT 7
- 405 Method Not Allowed: [no body]. But actually it is the right method HOT 2
- Get a list of all commits from a repository will lost some file sometimes HOT 3
- Commit history overflow in issue page HOT 4
- pre-receive hook error after updating HOT 9
- Button color regression
- Propose to restart 1.22 release HOT 7
- Non-admin user doesn't show repo dummy description HOT 4
- How to migrate data between Gitea servers? HOT 4
- Field login_name is empty after create an user
- To clone the project locally, execute 'make build' and get the following error HOT 10
- Watch/Unwatch, Star/Unstar buttons style error. Wrong radiuses have been added. HOT 1
- downgrade database version from 280" to'189" is not supported and may result in loss of data integrity. HOT 7
- Update failed if the `website` field is carried, when requesting `/user/settings` interface. HOT 3
- import from gogs /github.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gitea.