diff --git a/gitgen.py b/gitgen.py
index b3900e0..8f40fc8 100644
--- a/gitgen.py
+++ b/gitgen.py
@@ -111,13 +111,13 @@ class GitRepoScanner:
return None
def get_readme_content(self, repo_path: Path) -> Optional[str]:
- for name in ['README.md', 'README.txt', 'README', 'readme.md']:
+ for name in ['README.md', 'README.txt', 'README', 'readme.md', 'readme.txt']:
path = repo_path / name
if path.exists():
for enc in ('utf-8', 'latin-1'):
try:
content = path.read_text(encoding=enc)
- return markdown.markdown(content, extensions=["tables", "sane_lists", "fenced_code"]) if name.endswith('.md') else f"<pre>{html.escape(content)}</pre>"
+ return markdown.markdown(content, extensions=["tables", "sane_lists", "fenced_code"]) if name.endswith('.md') else f"<div class=\"rd-txt\">{html.escape(content)}</div>"
except Exception:
pass
return None
diff --git a/main.css b/main.css
index f390332..4faa522 100644
--- a/main.css
+++ b/main.css
@@ -153,6 +153,13 @@ body {
font-weight: bold;
}
+ .rd-txt {
+ display: block;
+ white-space: pre-wrap;
+ overflow-wrap: normal;
+ font-family: monospace;
+ }
+
.meta-item {
display: grid;
grid-template-columns: max-content 1fr;
@@ -404,7 +411,7 @@ pre code {
.footer {
text-align: center;
- margin-top: 3rem;
+ margin: 3rem 0 2rem 0;
padding-top: 2rem;
border-top: 1px solid #dee2e6;
color: #6c757d;
@@ -486,7 +493,7 @@ pre code {
background: white;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
- margin-bottom: 2rem;
+ margin-bottom: 3rem;
}
.repo-name {