muesli / markscribe

Your personal markdown scribe with template-engine and Git(Hub) & RSS powers 📜
MIT License
366 stars 40 forks source link

HTML comments are removed #62

Closed jetzlstorfer closed 1 year ago

jetzlstorfer commented 1 year ago

When using markscribe all HTML comments are removed. However, in certain cases a user still wants to keep HTML comments as part of the output of the templating.

Example:

I take the current version of the master branch and run this code (based on the original template):

### Hi there 👋

<!-- raw html -->

#### 👷 Check out what I'm currently working on
{{range recentContributions 10}}
- [{{.Repo.Name}}]({{.Repo.URL}}) - {{.Repo.Description}} ({{humanize .OccurredAt}})
{{- end}}
....

the result is rendered like this:

### Hi there 👋

#### 👷 Check out what I'm currently working on

- [jetzlstorfer/plattentests-go](https://github.com/jetzlstorfer/plattentests-go) - creates a spotify playlist based on most recent record reviews from my favourite music website plattentests.de 💿 (today)
...

As you can see, the HTML comment is now gone. Therefore I implemented the comment function that keeps the comment.

Desired fix: Provide a way so that HTML comments are still shown in the generated file.

fakeyanss commented 1 year ago

+1, when I want to use both wakatime action and readme-scribe together.

readme-scribe remove my specified comment like this, from

### Weekly development breakdown

<!--START_SECTION:waka-->
<!--END_SECTION:waka-->

to

### Weekly development breakdown

And then my wakatime result cannot output to profile readme.

muesli commented 1 year ago

Oh, I see now. This might be a result of using html/template. We should probably just switch to text/template and this might be fixed.

jetzlstorfer commented 1 year ago

thanks for bringing up this idea @muesli ! I've now fixed this in #63 and would appreciate if we can merge it!