forgejo/modules
silverwind 527e5bd1b2
Fix copy/paste of empty lines (#19798)
* Fix copy/paste of empty newlines again

Fixes: https://github.com/go-gitea/gitea/issues/19331
Regressed by: https://github.com/go-gitea/gitea/pull/18270

Needed to do another newline addition to the Chroma output HTML to get
copy/paste work again. The previous replacement conditions are probably
obsolete, but as I'm not 100% sure, I opted to keep them.

Specifically, the Chroma HTML change mentioned in
https://github.com/go-gitea/gitea/pull/18270#issuecomment-1013350246
broke our previous newline replacement for such empty lines.

Also included are a few changes to make the test more pleasant to work
with.

* run go mod tidy

* add util.Dedent

* copy in the code

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
2022-06-10 21:45:28 +08:00
..
activitypub
analyze
appstate
auth
avatar
base
cache Update go-chi/cache to utilize Ping() (#19719) 2022-05-15 20:43:27 +02:00
charset Detect truncated utf-8 characters at the end of content as still representing utf-8 (#19773) 2022-05-21 14:06:24 +01:00
container
context Move some repository related code into sub package (#19711) 2022-06-06 16:01:49 +08:00
convert Nuke the incorrect permission report on /api/v1/notifications (#19761) 2022-05-20 18:57:49 +02:00
csv
doctor Add breaking email restrictions checker in doctor (#19903) 2022-06-07 16:51:33 -04:00
emoji
eventsource
generate
git Refactor git module, make Gitea use internal git config (#19732) 2022-06-10 09:57:49 +08:00
gitgraph Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
graceful
hcaptcha
highlight Fix copy/paste of empty lines (#19798) 2022-06-10 21:45:28 +08:00
hostmatcher
httpcache
httplib
indexer Refactor git module, make Gitea use internal git config (#19732) 2022-06-10 09:57:49 +08:00
json
lfs
log
markup Custom regexp external issues (#17624) 2022-06-10 13:39:53 +08:00
metrics
migration Prevent NPE whilst migrating if there is a team request review (#19855) 2022-06-09 10:50:05 +08:00
nosql
notification
options
packages
paginator
password
pprof
private
process Set Setpgid on child git processes (#19865) 2022-06-03 15:36:18 +01:00
proxy
public
queue
recaptcha
references Custom regexp external issues (#17624) 2022-06-10 13:39:53 +08:00
regexplru Custom regexp external issues (#17624) 2022-06-10 13:39:53 +08:00
repository Refactor git module, make Gitea use internal git config (#19732) 2022-06-10 09:57:49 +08:00
secret
session
setting Make AppDataPath absolute against the AppWorkPath if it is not (#19815) 2022-06-06 10:43:17 -04:00
ssh Implement http signatures support for the API (#17565) 2022-06-05 08:16:14 +01:00
storage
structs
svg
sync
templates Automatically render wiki TOC (#19873) 2022-06-08 16:59:16 +08:00
test
timeutil
translation
typesniffer Fix raw endpoint PDF file headers (#19825) 2022-05-28 18:10:14 +03:00
updatechecker
upload
uri
user
util Fix copy/paste of empty lines (#19798) 2022-06-10 21:45:28 +08:00
validation
web Ensure responses are context.ResponseWriters (#19843) 2022-05-31 21:27:44 +01:00