Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
52ecf0f713 | ||
|
|
5fb521e89e | ||
|
|
bba2178496 | ||
|
|
41c373f46c | ||
|
|
7158713a2a | ||
|
|
73a68157cc |
No files matched your search
@@ -7,6 +7,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [2.18.2] - 2026-11-12
|
||||
|
||||
### Fixed
|
||||
- Tables in notes and articles: words in cells were split mid-word (a narrow
|
||||
first column read "Colo/r", "Blac/k") and cells had no padding or left
|
||||
alignment. Tables now keep words whole and render as a card that fills the
|
||||
column: raised background, rounded border, shaded header row, roomy cells,
|
||||
sans-serif text at reading size, bold first column. Rendered tables are
|
||||
wrapped in `<div class="table-wrap">`, which scrolls sideways on narrow
|
||||
screens.
|
||||
|
||||
### Changed
|
||||
- Public pages are wider: 48rem instead of 40rem (about 85 characters per
|
||||
line at the reading font). Admin pages stay at 60rem.
|
||||
- The site header (title, menu, search) and footer are 60rem wide on every
|
||||
page, so they sit in the same place on public and admin pages; only the
|
||||
content column differs.
|
||||
|
||||
## [2.18.1] - 2026-11-12
|
||||
|
||||
### Changed
|
||||
|
||||
- The MCP `create_note` tool says that articles live at `/article/<slug>` with a slug made from the title, so AI clients leave `slug` out unless they want a specific one
|
||||
|
||||
## [2.18.0] - 2026-11-12
|
||||
|
||||
A tidier admin area.
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# v2.18.1: MCP create_note describes article URLs and slugs
|
||||
|
||||
Documentation-only follow-up to ADR-077 (v2.17.x). The MCP `create_note`
|
||||
tool description now says that a title makes the post an article at
|
||||
`/article/<slug>`, that articles get their slug from the title and other
|
||||
notes from the time, and that `slug` is only needed for a specific slug.
|
||||
AI clients read tool descriptions to decide which arguments to send, so
|
||||
this keeps them from making up a slug the title would already give.
|
||||
No behaviour change.
|
||||
@@ -468,5 +468,5 @@ def create_app(config=None):
|
||||
|
||||
# Package version (Semantic Versioning 2.0.0)
|
||||
# See docs/standards/versioning-strategy.md for details
|
||||
__version__ = "2.18.0"
|
||||
__version_info__ = (2, 18, 0)
|
||||
__version__ = "2.18.2"
|
||||
__version_info__ = (2, 18, 2)
|
||||
@@ -232,9 +232,11 @@ def register_tools(server: MCPServer, app: Flask) -> None:
|
||||
) -> dict:
|
||||
"""Create a note (Markdown). It is a draft unless draft is false;
|
||||
publishing makes it public and crossposts it to the syndicate_to
|
||||
targets. A title makes it an article; summary is its short summary,
|
||||
shown on the homepage and in feeds and crossposts. At most one of like_of,
|
||||
repost_of and bookmark_of. published_at is an ISO 8601 date."""
|
||||
targets. A title makes it an article, at /article/<slug>; summary is its
|
||||
short summary, shown on the homepage and in feeds and crossposts. The
|
||||
slug is made from the title for articles and from the time for other
|
||||
notes, so leave slug out unless a specific one is wanted. At most one of
|
||||
like_of, repost_of and bookmark_of. published_at is an ISO 8601 date."""
|
||||
info = _token_info()
|
||||
_require(info, "create", "draft")
|
||||
|
||||
|
||||
+3
-1
@@ -62,7 +62,9 @@ ALLOWED_ATTRIBUTES = {
|
||||
def render_markdown(text: str) -> str:
|
||||
"""Note Markdown (or HTML) to sanitized HTML"""
|
||||
html = markdown.markdown(text, extensions=MARKDOWN_EXTENSIONS)
|
||||
return nh3.clean(html, tags=ALLOWED_TAGS, attributes=ALLOWED_ATTRIBUTES)
|
||||
html = nh3.clean(html, tags=ALLOWED_TAGS, attributes=ALLOWED_ATTRIBUTES)
|
||||
# A wrapper lets a table fill the column yet scroll sideways when too wide (v2.18.2)
|
||||
return re.sub(r"<table\b", '<div class="table-wrap"><table', html).replace("</table>", "</table></div>")
|
||||
|
||||
|
||||
# Likes, reposts and bookmarks (v2.5.0, v2.9.0)
|
||||
|
||||
+13
-1
@@ -8,7 +8,7 @@
|
||||
--font-reading: Charter, 'Bitstream Charter', 'Sitka Text', Cambria, 'Noto Serif', Georgia, serif;
|
||||
--font-mono: ui-monospace, 'SF Mono', Monaco, Consolas, 'Liberation Mono', monospace;
|
||||
--spacing-xs: 0.25rem; --spacing-sm: 0.5rem; --spacing-md: 1rem; --spacing-lg: 2rem; --spacing-xl: 4rem;
|
||||
--max-width: 40rem; --border-radius: 6px;
|
||||
--max-width: 48rem; --frame-width: 60rem; --border-radius: 6px;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
@@ -40,6 +40,9 @@ pre code { padding: 0; background: none; }
|
||||
|
||||
/* Page frame */
|
||||
.site-header, main, .site-footer { width: 100%; max-width: var(--max-width); margin-left: auto; margin-right: auto; }
|
||||
/* Header and footer share one width on every page, public and admin (v2.18.2);
|
||||
only the content column (main) differs: 48rem to read, 60rem for admin tables. */
|
||||
.site-header, .site-footer { max-width: var(--frame-width); }
|
||||
main { flex: 1; margin-bottom: var(--spacing-xl); }
|
||||
|
||||
.site-header {
|
||||
@@ -91,6 +94,15 @@ main { flex: 1; margin-bottom: var(--spacing-xl); }
|
||||
.e-content blockquote { margin: 0 0 var(--spacing-md); padding-left: var(--spacing-md); border-left: 3px solid var(--color-border); color: var(--color-text-light); }
|
||||
.e-content ul, .e-content ol { margin: 0 0 var(--spacing-md) 1.25rem; }
|
||||
.e-content img { max-width: 100%; height: auto; }
|
||||
/* Tables (v2.18.2): a card that fills the column, in the page's sans font at
|
||||
the reading size; scrolls sideways when wider than the column. Words in
|
||||
cells are never split (overflow-wrap: anywhere above is for long URLs in
|
||||
prose; in a cell it squeezed columns to a few letters). */
|
||||
.e-content .table-wrap { overflow-x: auto; margin: 0 0 var(--spacing-md); background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: var(--border-radius); }
|
||||
.e-content table { width: 100%; border-collapse: collapse; font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.6; }
|
||||
.e-content th, .e-content td { padding: 0.9rem 1.25rem; text-align: left; vertical-align: top; overflow-wrap: normal; }
|
||||
.e-content th { font-weight: 600; white-space: nowrap; background: color-mix(in srgb, var(--color-text) 6%, var(--color-bg-alt)); }
|
||||
.e-content td:first-child { font-weight: 600; }
|
||||
.e-content h1, .e-content h2, .e-content h3 { font-family: var(--font-body); }
|
||||
.reaction { margin-bottom: var(--spacing-sm); font-size: 0.9375rem; color: var(--color-text-light); overflow-wrap: anywhere; }
|
||||
.reaction-verb { font-weight: 600; margin-right: 0.25rem; }
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
|
||||
|
||||
def test_tables_get_a_scroll_wrapper():
|
||||
"""v2.18.2: tables are wrapped so they can fill the column and scroll sideways"""
|
||||
from starpunk.models import render_markdown
|
||||
|
||||
html = render_markdown("| Color | Why |\n|---|---|\n| Black | Removal |\n\nAfter")
|
||||
assert html.startswith('<div class="table-wrap"><table>') and "</table></div>" in html
|
||||
assert "<p>After</p>" in html
|
||||
Reference in new issue
Block a user