diff options
| author | Anhgelus Morhtuuzh <william@herges.fr> | 2025-10-06 14:19:23 +0200 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <william@herges.fr> | 2025-10-06 14:19:23 +0200 |
| commit | 2aedff3d2bbdcad93d6ca0ec883c446c703cafaa (patch) | |
| tree | fcf05632375779fe909155acefe93555e97e401b | |
| parent | 0ac33061f8275a6808276adfa8ea8b8dcd92d7c9 (diff) | |
fix(frontend): code multi line does not wrap
| -rw-r--r-- | backend/logs.go | 1 | ||||
| -rw-r--r-- | frontend/scss/general.scss | 6 | ||||
| -rw-r--r-- | frontend/scss/special.scss | 4 | ||||
| -rw-r--r-- | markdown/ast_paragraph.go | 2 |
4 files changed, 10 insertions, 3 deletions
diff --git a/backend/logs.go b/backend/logs.go index db69462..81e6f77 100644 --- a/backend/logs.go +++ b/backend/logs.go @@ -108,6 +108,7 @@ func readLogDir(path string, dir []os.DirEntry) error { } func HandleLogs(r *chi.Mux) { + r.Get("/logs", handleLogList) r.Route("/logs", func(r chi.Router) { r.Get("/", handleLogList) r.Get("/{slug:[a-zA-Z0-9-]+}", handleLog) diff --git a/frontend/scss/general.scss b/frontend/scss/general.scss index 0d9acf3..694a4b0 100644 --- a/frontend/scss/general.scss +++ b/frontend/scss/general.scss @@ -160,9 +160,15 @@ pre { padding: 0.5rem 1rem; & code { + display: block; + max-width: 100%; + padding: 0; background: none; border: none; + + word-break: break-all; + white-space: break-spaces; } } diff --git a/frontend/scss/special.scss b/frontend/scss/special.scss index 3510f21..bee2ecb 100644 --- a/frontend/scss/special.scss +++ b/frontend/scss/special.scss @@ -39,7 +39,7 @@ header { & a { display: block; - min-width: 8rem; + min-width: 7rem; font-family: monospace; } @@ -56,4 +56,4 @@ footer { border-top: var(--color-light) 2px solid; font-size: var(--font-size-tiny); -}
\ No newline at end of file +} diff --git a/markdown/ast_paragraph.go b/markdown/ast_paragraph.go index ca5541f..361b2f2 100644 --- a/markdown/ast_paragraph.go +++ b/markdown/ast_paragraph.go @@ -52,7 +52,7 @@ func paragraph(lxs *lexers, oneLine bool) (*astParagraph, *ParseError) { case lexerLiteral, lexerHeader: s := lxs.Current().Value // replace line break by space - if n > 0 { + if n > 0 && len(tree.content) != 0 { s = " " + s } n = 0 |
