diff --git a/modules/markup/tsv/tsv.go b/modules/markup/tsv/tsv.go index 24432645a3..307283a510 100644 --- a/modules/markup/tsv/tsv.go +++ b/modules/markup/tsv/tsv.go @@ -10,7 +10,6 @@ import ( "html" "io" "regexp" - "strings" "code.gitea.io/gitea/modules/markup" "code.gitea.io/gitea/modules/markup/markdown" @@ -44,7 +43,6 @@ func (p Parser) Render(rawBytes []byte, urlPrefix string, metas map[string]strin var tmpBlock bytes.Buffer tmpBlock.WriteString(``) rowID := 0 - noteID := -1 for { fields, err := rd.Read() if err == io.EOF { @@ -54,15 +52,11 @@ func (p Parser) Render(rawBytes []byte, urlPrefix string, metas map[string]strin continue } tmpBlock.WriteString("") - for colID, field := range fields { - if rowID == 0 && strings.HasSuffix(strings.ToLower(field), "note") { - noteID = colID - } - if rowID > 0 && colID == noteID { - tmpBlock.WriteString(`") diff --git a/web_src/less/dcs.less b/web_src/less/dcs.less index a1292a1d7e..36aa7d4a26 100644 --- a/web_src/less/dcs.less +++ b/web_src/less/dcs.less @@ -10,43 +10,39 @@ th, td { vertical-align: top; + line-height: normal !important; + + h1, + h2, + h3, + h4 { + border-bottom: none; + white-space: nowrap; + } + + h1 { + font-size: 2em; + } + + h2 { + font-size: 1.5em; + } + + h3 { + font-size: 1.25em; + } + + h4, + h5, + h6 { + font-size: 1em; + } - &:last-child { - line-height: normal !important; - min-width: 300px; - - h1, - h2, - h3, - h4 { - border-bottom: none; - white-space: nowrap; - } - - h1 { - font-size: 2em; - } - - h2 { - font-size: 1.5em; - } - - h3 { - font-size: 1.25em; - } - - h4, - h5, - h6 { - font-size: 1em; - } - - ol, - ul { - display: flex; - flex-direction: column; - padding-bottom: 16px; - } + ol, + ul { + display: flex; + flex-direction: column; + padding-bottom: 16px; } } }
`) + for _, field := range fields { + tmpBlock.WriteString(``) + if rowID > 0 { tmpBlock.WriteString(string(markdown.Render([]byte(newlineRegexp.ReplaceAllString(field, "\n")), urlPrefix, metas))) } else { - tmpBlock.WriteString("") tmpBlock.WriteString(html.EscapeString(field)) } tmpBlock.WriteString("