Include path in filePath param for preview in the online editor (#3896)

This commit is contained in:
Naoki Takezoe
2025-12-23 10:59:08 +09:00
committed by GitHub
parent e1e369d653
commit 7aee451a55
2 changed files with 2 additions and 2 deletions

View File

@@ -174,7 +174,7 @@ trait RepositoryViewerControllerBase extends ControllerBase {
filename match {
case Some(f) =>
helpers.renderMarkup(
filePath = List(f),
filePath = f.split("/").toList,
fileContent = params("content"),
branch = repository.repository.defaultBranch,
repository = repository,

View File

@@ -215,7 +215,7 @@ $(function(){
$.post('@helpers.url(repository)/_preview', {
content : editor.getValue(),
enableWikiLink : false,
filename : $('#newFileName').val(),
filename : $('path').val() + '/' + $('#newFileName').val(),
enableRefsLink : false,
enableLineBreaks : false,
enableTaskList : false