go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
43.1k stars 5.31k forks source link

markdown renderer with lua filter header broken #19061

Open pfpulux opened 2 years ago

pfpulux commented 2 years ago

Gitea Version

1.16.3

Git Version

2.35

Operating System

voidlinux

How are you running Gitea?

distribution package run as runit service

Database

SQLite

Log Gist

No response

Description

After an update from 11 to 16 the markdown renderer don't render the whole file if it includes a lua-filter header.

example markdown source

Screenshots

No response

noerw commented 2 years ago

Can confirm, but note that the header is terminated by ..., is this really what you wanted? I never heard of lua filter headers (do you have resources on that?), only yaml headers which are terminated by --- and are working correctly. I assume Gitea tries to parse a yaml header, finds that it never terminates, and thus doesn't even start parsing or rendering markdown.

pfpulux commented 2 years ago

Hm, may not lua header, it is more or less yaml.

We use usage eisvogel.tex and the example from Usage shows this:

---
title: "The Document Title"
author: [Example Author, Another Author]
date: "2017-02-20"
keywords: [Markdown, Example]
...

Here is the actual document text...

Ah, may a bad example, which ... means there is more.

Nop also the basic-example use this syntax, see also the pandoc docs