From 8f998018786ddf6f8383cb1938df006e5c72b289 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 2 May 2020 19:39:09 +0000 Subject: [PATCH] Git patch format in web interface --- webinterface.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/webinterface.py b/webinterface.py index d159e9072..0e18e3508 100644 --- a/webinterface.py +++ b/webinterface.py @@ -69,6 +69,7 @@ from happening import thisWeeksEventsCheck from happening import getCalendarEvents from happening import getTodaysEvents from git import isGitPatch +from git import gitFormatContent def updateAvatarImageCache(session, baseDir: str, httpPrefix: str, @@ -3977,7 +3978,11 @@ def individualPostAsHtml(recentPostsCache: {}, maxRecentPosts: int, postJsonObject['object']['content']): contentStr = '
' + contentStr + '
' else: - contentStr = '
' + contentStr + '
' + patchStr = gitFormatContent(postJsonObject['object']['content']) + contentStr = \ + '
' + \ + patchStr.replace('\n','
') + \ + '
' postHtml = '' if boxName != 'tlmedia':