Detect markdown line width, resolve relative URLs #332

Merged
zeripath merged 10 commits from noerw/tea:markdown-linewrap into master 1 month ago
noerw commented 2 months ago

this is semi-blocked by https://github.com/charmbracelet/glamour/pull/96, but behaviour isn't really worse than the previous behaviour (most links work, some are still broken)

tea pr 332
tea checkout 332 && make install && tea pr 332
~~this is semi-blocked by https://github.com/charmbracelet/glamour/pull/96, but behaviour isn't really worse than the previous behaviour (most links work, some are still broken)~~ #### testcase for link resolver ``` tea pr 332 tea checkout 332 && make install && tea pr 332 ``` - [rel](./332) - [abs](/gitea/tea/pulls/332) - [full](https://gitea.com/gitea/tea/pulls/332)
noerw added 2 commits 2 months ago
0b661bd2fc
resolve markdown links relative to issue content URL
noerw added the
kind/enhancement
status/blocked
labels 2 months ago
noerw removed the
status/blocked
label 2 months ago
noerw changed title from detect markdown line width to detect markdown line width, resolve relative URLs 2 months ago
6543 reviewed 1 month ago
modules/print/comment.go Outdated
"Comments\n%s",
strings.Join(out, "\n"),
))
), comments[0].HTMLURL)
6543 commented 1 month ago
Poster
Collaborator

if len comments == 0 ... nil pointer exeption!

if len comments == 0 ... nil pointer exeption!
6543 marked this conversation as resolved
6543 added 1 commit 1 month ago
aa6d49ab09
no nil exeption
6543 added 1 commit 1 month ago
56b7ab9364
speedup ?
6543 approved these changes 1 month ago
6543 added 1 commit 1 month ago
6e53b32637 Merge branch 'master' into markdown-linewrap
6543 added 1 commit 1 month ago
19a55ada09 Merge branch 'master' into markdown-linewrap
6543 requested changes 1 month ago
6543 left a comment

sorry got:

  • rel https://gitea.com/gitea/tea/pulls/332                                                                         
  • abs https://gitea.com/gitea/tea/pulls/gitea/tea/pulls/332                                                         
  • full https://gitea.com/gitea/tea/pulls/332    

while testing tea issue 332

6543 added 1 commit 1 month ago
9134a7b2b8
use replace to get upstream patch
6543 approved these changes 1 month ago
6543 added this to the v0.7.0 milestone 1 month ago
6543 added 1 commit 1 month ago
ba10cc7924 Merge branch 'master' into markdown-linewrap
6543 added 1 commit 1 month ago
76f150b595
update
Poster

From discussion at https://github.com/charmbracelet/glamour/pull/96 i understood that we probably should resolve URLs relative to repo.HTMLURL, instead of the issue / comment URL.
This enables cases where a file is linked from the repo file tree etc, and follows what the gitea web UI does.
Will commit a solution later..

some gitea markdown testing (github equivalent)

From discussion at https://github.com/charmbracelet/glamour/pull/96 i understood that we probably should resolve URLs relative to repo.HTMLURL, instead of the issue / comment URL. This enables cases where a file is linked from the repo file tree etc, and follows what the gitea web UI does. Will commit a solution later.. #### some gitea markdown testing ([`github` equivalent](https://github.com/charmbracelet/glamour/pull/96#issuecomment-791417905)) - [src/branch/master/modules/print/markdown.go](src/branch/master/modules/print/markdown.go) - [modules/print/markdown.go](modules/print/markdown.go) - [/src/branch/master/modules/print/markdown.go](/src/branch/master/modules/print/markdown.go) - [/modules/print/markdown.go](/modules/print/markdown.go)
noerw added the
status/wip
label 1 month ago
6543 changed title from detect markdown line width, resolve relative URLs to Detect markdown line width, resolve relative URLs 1 month ago
Collaborator

@noerw status?

@noerw status?
6543 modified the milestone from v0.7.0 to v0.8.0 1 month ago
Poster

@6543 didn't find the time yet. i guess we can merge + change behaviour in a followup, if you want to release 0.7.0 now

@6543 didn't find the time yet. i guess we can merge + change behaviour in a followup, if you want to release 0.7.0 now
noerw removed the
status/wip
label 1 month ago
noerw modified the milestone from v0.8.0 to v0.7.0 1 month ago
noerw added the
status/needs-reviews
label 1 month ago
6543 added 1 commit 1 month ago
8fac65abd4 Merge branch 'master' into markdown-linewrap
6543 approved these changes 1 month ago
zeripath approved these changes 1 month ago
zeripath merged commit 222d0501df into master 1 month ago
lafriks approved these changes 1 month ago
lafriks deleted branch markdown-linewrap 1 month ago
Owner

I was few seconds late 😆

I was few seconds late 😆
6543 removed the
status/needs-reviews
label 1 month ago

Reviewers

6543 approved these changes 1 month ago
zeripath approved these changes 1 month ago
lafriks approved these changes 1 month ago
continuous-integration/drone/pr Build is passing
The pull request has been merged as 222d0501df.
Sign in to join this conversation.
Loading…
There is no content yet.