Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow markdown in Intros and Outros as an alternate to plain text #31

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ruqqq
Copy link

@ruqqq ruqqq commented Jan 15, 2018

Should (at least partly) solve #17.

@ruqqq
Copy link
Author

ruqqq commented Jan 15, 2018

Still need to figure out how to render plain text of the markdowns (including the FreeMarkdown field?)

@codecov-io
Copy link

codecov-io commented Jan 15, 2018

Codecov Report

Merging #31 into master will increase coverage by 0.08%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #31      +/-   ##
==========================================
+ Coverage   98.45%   98.54%   +0.08%     
==========================================
  Files           3        3              
  Lines         907      959      +52     
==========================================
+ Hits          893      945      +52     
  Misses          8        8              
  Partials        6        6
Impacted Files Coverage Δ
hermes.go 77.77% <ø> (ø) ⬆️
flat.go 99.55% <100%> (+0.02%) ⬆️
default.go 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 535ed84...5238a36. Read the comment docs.

@matcornic
Copy link
Owner

matcornic commented Jan 17, 2018

Thanks @ruqqq for the PR. Looks fine to me for now, but could you add/modify some examples and tests ? The goal is checking automatically with CI that Markdown is (and will be - with future changes) displayed as expected.

  • tests are in hermes_test.go
  • examples are in examples folder. Just go in it and launch go run *.go

To answer your question, plain text version of FreeMarkdown content is generated as follows:

  1. Markdown -> HTML (with Blackfriday)
  2. HTML -> Text (with htmlToText)

@ruqqq
Copy link
Author

ruqqq commented Jan 18, 2018

Will do so when I get some free time. Curious question: why aren't all the fields markdown enabled by default?

@matcornic
Copy link
Owner

matcornic commented Jan 29, 2018

@ruqqq Hmm, you're right. At first, when I created this issue, I thought I would make all fields Markdown enabled.
But we need to see if themes are robust enough with handling Markdown as well (e.g. Markdown in table)

@danielpoe
Copy link

All fields markdown support will be awesome.

@PetitCassoulet
Copy link

Hey guys, is there a reason why this still hasn't been merged ? It's a pain to only have plaintext in intros and outros :(

mheers added a commit to mheers/hermes that referenced this pull request Nov 3, 2020
@ChronosMasterOfAllTime
Copy link

@PetitCassoulet @ruqqq

I have forked this repo to: https://github.com/go-hermes/hermes

I have implemented this PR here go-hermes#6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants