Browse Source

Remove prefixed whitespace in markdown rendering

initial-username
Gabe Kangas 2 months ago
parent
commit
bf6a3d9e85
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      test/automated/configmanagement.test.js
  2. +1
    -1
      utils/utils.go

+ 1
- 1
test/automated/configmanagement.test.js View File

@ -85,7 +85,7 @@ test('verify updated config values', async (done) => {
const res = await request.get('/api/config');
expect(res.body.name).toBe(serverName);
expect(res.body.streamTitle).toBe(streamTitle);
expect(res.body.summary).toBe(serverSummary);
expect(res.body.summary).toBe(`<p>${serverSummary}</p>`);
expect(res.body.extraPageContent).toBe(pageContent);
expect(res.body.logo).toBe('/logo');
expect(res.body.socialHandles).toStrictEqual(socialHandles);


+ 1
- 1
utils/utils.go View File

@ -141,7 +141,7 @@ func RenderPageContentMarkdown(raw string) string {
panic(err)
}
return buf.String()
return strings.TrimSpace(buf.String())
}
// GetCacheDurationSecondsForPath will return the number of seconds to cache an item.


Loading…
Cancel
Save