Skip to content

Commit e3fb765

Browse files
committed
fix
1 parent 037f72b commit e3fb765

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

routers/web/repo/view_readme.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ func prepareToRenderReadmeFile(ctx *context.Context, subfolder string, readmeFil
162162
defer dataRc.Close()
163163

164164
ctx.Data["FileIsText"] = fInfo.isTextFile
165-
ctx.Data["FileTreePath"] = path.Join(subfolder, readmeFile.Name())
165+
ctx.Data["FileTreePath"] = path.Join(ctx.Repo.TreePath, subfolder, readmeFile.Name())
166166
ctx.Data["FileSize"] = fInfo.fileSize
167167
ctx.Data["IsLFSFile"] = fInfo.isLFSFile
168168

web_src/js/features/comp/EditorUpload.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ function handleClipboardText(textarea: HTMLTextAreaElement, e: ClipboardEvent, p
135135

136136
// when pasting links over selected text, turn it into [text](link)
137137
const pastedAsMarkdown = pasteAsMarkdownLink(textarea, pastedText);
138-
if (pastedText) {
138+
if (pastedAsMarkdown) {
139139
e.preventDefault();
140140
replaceTextareaSelection(textarea, pastedAsMarkdown);
141141
}

0 commit comments

Comments
 (0)