Skip to content

Enhance markdown file preview rendering - #25212

Merged
MorrisJobke merged 2 commits into
masterfrom
enh/preview-markdown
Jan 20, 2021
Merged

Enhance markdown file preview rendering#25212
MorrisJobke merged 2 commits into
masterfrom
enh/preview-markdown

Conversation

@juliusknorr

@juliusknorrjuliusknorr commented Jan 19, 2021

Copy link
Copy Markdown
Member

This PR tries to apply some sort of styling to markdown previews (mainly giving the headers a different size) and remove markdown symbols that we currently cannot render. This should give the user a bit of an overview how the file is structured.

  • Remove markdown symbols that we cannot render (bold/italic/strikethrough/links)
  • 4-byte characters are removed since imagettftext is unable to render them even with a ttf font that includes symbols for that, i also gave pango rendering with imagemagick a try for that but none seem to work properly unfortunately

Feedback from @jancborchardt

  • Bold headlines
  • more space above the headings but less below

image

image

@rullzerrullzer added this to the Nextcloud 21 milestone Jan 20, 2021
@juliusknorrjuliusknorr added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Jan 20, 2021
Signed-off-by: Julius Härtl <jus@bitgrid.net>

@rullzerrullzer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it is waiting for the first report that it doesn't look exactly like the editor. But so be it I guess :)

Comment threadlib/private/Preview/MarkDown.php Outdated
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
@MorrisJobke
MorrisJobke merged commit 4c81f5c into masterJan 20, 2021
@MorrisJobke
MorrisJobke deleted the enh/preview-markdown branch January 20, 2021 14:02
@rullzerrullzer mentioned this pull request Jan 21, 2021
15 tasks
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsenhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@juliusknorr@rullzer@MorrisJobke