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

Handle yaml frontmatter in markdown #11016

Merged
merged 2 commits into from Apr 9, 2020

Conversation

zeripath
Copy link
Contributor

@zeripath zeripath commented Apr 8, 2020

Add goldmark-meta to render yaml frontmatter as a table

Fix #5377

Signed-off-by: Andrew Thornton art27@cantab.net

Add goldmark-meta to render yaml frontmatter as a table

Fix go-gitea#5377

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label Apr 8, 2020
@zeripath zeripath added this to the 1.12.0 milestone Apr 8, 2020
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Apr 8, 2020
@zeripath
Copy link
Contributor Author

zeripath commented Apr 8, 2020

OK, so issues with this approach:

  • the yaml frontmatter is always rendered as table - so if you put something on an issue, comment, etc. it will also be rendered
  • We may not want to render this as a table. The related issue suggests as a code block. It may make sense to render this a table that is expandable etc.
  • We can probably use the meta in a cool way to handle specific extensions to rendering - eg. turn on/off extensions like typography.

@techknowlogick techknowlogick self-requested a review April 8, 2020 19:16
@codecov-io
Copy link

Codecov Report

Merging #11016 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #11016   +/-   ##
=======================================
  Coverage   43.42%   43.43%           
=======================================
  Files         597      597           
  Lines       84626    84627    +1     
=======================================
+ Hits        36750    36758    +8     
+ Misses      43344    43336    -8     
- Partials     4532     4533    +1     
Impacted Files Coverage Δ
modules/markup/markdown/markdown.go 90.90% <100.00%> (+0.13%) ⬆️
modules/indexer/stats/queue.go 62.50% <0.00%> (-18.75%) ⬇️
modules/indexer/stats/db.go 40.62% <0.00%> (-9.38%) ⬇️
modules/git/command.go 86.95% <0.00%> (-2.61%) ⬇️
services/pull/check.go 52.43% <0.00%> (-0.61%) ⬇️
services/pull/pull.go 35.88% <0.00%> (+0.88%) ⬆️
modules/queue/workerpool.go 60.49% <0.00%> (+2.49%) ⬆️
services/pull/temp_repo.go 31.62% <0.00%> (+2.56%) ⬆️
services/pull/patch.go 65.73% <0.00%> (+2.79%) ⬆️

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 08208cd...a42e211. Read the comment docs.

Copy link
Member

@6543 6543 left a comment

Choose a reason for hiding this comment

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

smal diff huge efect ;)

I'm ok how it is formated - hiding it behind a icon is a nice idear but in my view not so importand

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Apr 9, 2020
@zeripath
Copy link
Contributor Author

zeripath commented Apr 9, 2020

make lg-tm work

@zeripath
Copy link
Contributor Author

zeripath commented Apr 9, 2020

OK I'm going to merge but will continue to improve

@zeripath zeripath merged commit 0be25e2 into go-gitea:master Apr 9, 2020
@zeripath zeripath deleted the fix-5377-yaml-frontmatter branch April 9, 2020 10:54
@zeripath zeripath changed the title Handle yaml frontmatter Handle yaml frontmatter in markdown May 17, 2020
ydelafollye pushed a commit to ydelafollye/gitea that referenced this pull request Jul 31, 2020
Add goldmark-meta to render yaml frontmatter as a table

Fix go-gitea#5377

Signed-off-by: Andrew Thornton <art27@cantab.net>
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/feature Completely new functionality. Can only be merged if feature freeze is not active.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

YAML frontmatter rendered improperly
6 participants