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

Make sure sibling images get a link too #14979

Conversation

zeripath
Copy link
Contributor

Due a problem with the ast.Walker in the our transformer in goldmark
an image with a sibling image will not be transformed to gain a parent
link. This PR fixes this.

Fix #12925

Signed-off-by: Andrew Thornton art27@cantab.net

Due a problem with the ast.Walker in the our transformer in goldmark
an image with a sibling image will not be transformed to gain a parent
link. This PR fixes this.

Fix go-gitea#12925

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath added type/bug topic/ui Change the appearance of the Gitea UI backport/v1.13 labels Mar 12, 2021
@zeripath zeripath added this to the 1.14.0 milestone Mar 12, 2021
@noerw
Copy link
Member

noerw commented Mar 13, 2021

Could you add a testcase, I'm struggling to understand what this is for ;)

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 13, 2021
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Mar 13, 2021
Copy link
Member

@noerw noerw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks :>

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Mar 13, 2021
@noerw
Copy link
Member

noerw commented Mar 13, 2021

testcase is missing a \n at the end 🙃

@zeripath
Copy link
Contributor Author

weird it worked locally in vscode

@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (master@6463483). Click here to learn what that means.
The diff coverage is 86.66%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #14979   +/-   ##
=========================================
  Coverage          ?   42.24%           
=========================================
  Files             ?      774           
  Lines             ?    83008           
  Branches          ?        0           
=========================================
  Hits              ?    35063           
  Misses            ?    42246           
  Partials          ?     5699           
Impacted Files Coverage Δ
modules/markup/markdown/goldmark.go 56.95% <86.66%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6463483...57b75da. Read the comment docs.

@zeripath zeripath merged commit 164e35e into go-gitea:master Mar 14, 2021
@zeripath zeripath deleted the fix-12925-ensure-sibling-image-gets-a-link-too branch March 14, 2021 16:36
zeripath added a commit to zeripath/gitea that referenced this pull request Mar 14, 2021
Backport go-gitea#14979

Due a problem with the ast.Walker in the our transformer in goldmark
an image with a sibling image will not be transformed to gain a parent
link. This PR fixes this.

Fix go-gitea#12925

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath added the backport/done All backports for this PR have been created label Mar 14, 2021
lunny pushed a commit that referenced this pull request Mar 15, 2021
Backport #14979

Due a problem with the ast.Walker in the our transformer in goldmark
an image with a sibling image will not be transformed to gain a parent
link. This PR fixes this.

Fix #12925

Signed-off-by: Andrew Thornton <art27@cantab.net>
@go-gitea go-gitea locked and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. topic/ui Change the appearance of the Gitea UI type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

If adding two images in the description when creating a new issue, only the first is clickable.
6 participants