Commit 4261b3e5 authored by Christopher Fullarton's avatar Christopher Fullarton

Fixes markdown line break rendering. Fixes images in the voting on mobile devices

parent baefa3b7
Pipeline #33647 passed with stages
in 16 minutes and 19 seconds
<p [innerHTML]="sanitizeHTML(questionText)"></p>
\ No newline at end of file
<p [innerHTML]="sanitizeHTML(questionText)"
class="mb-0 overflow-hidden mathjax-container"></p>
......@@ -86,7 +86,7 @@ const appRoutes: Routes = [
// function that returns `MarkedOptions` with renderer override
export function markedOptionsFactory(): MarkedOptions {
const renderer = new MarkedRenderer();
renderer.paragraph = (text) => `${text}\n`;
renderer.paragraph = (text) => `${text}<br/>`;
return {
renderer: renderer,
......
......@@ -70,7 +70,7 @@ export class CustomMarkdownService {
if (imgMatch) {
imgMatch.forEach(token => {
const imgNode: HTMLImageElement = this.createElementFromHTML(token) as HTMLImageElement;
imgNode.classList.add(...['thumbnail', 'cursor-zoom-in', 'img-fluid']);
imgNode.classList.add(...['thumbnail', 'cursor-zoom-in']);
const anchorNode = document.createElement<'a'>('a');
anchorNode.href = imgNode.src;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment