- Add StyleContext class for extracting and applying HTML attributes/styles - Enhance MarkdownConverter with style-aware conversion methods - Switch backend storage from markdown to HTML with 'html' content type - Update editor workflow to preserve CSS classes, IDs, and attributes - Maintain markdown editing UX while storing HTML for style preservation - Support complex attributes like rel, data-*, aria-*, etc. This enables editing styled content like <a class="fancy" rel="me">text</a> while preserving all styling attributes through the markdown editing process.
1.0 KiB
1.0 KiB
AGENTS.md - Developer Guide for Insertr
Build/Test Commands
just dev- Full-stack development (recommended)just build- Build entire project (Go binary + JS library)just build-lib- Build JS library only
For running and testing our application read our justfile.
Code Style Guidelines
Go (Backend)
- Use standard Go formatting (
gofmt) - Package imports: stdlib → third-party → internal
- Error handling: always check and handle errors
- Naming: camelCase for local vars, PascalCase for exported
- Comments: package-level comments, exported functions documented
JavaScript (Frontend)
- ES6+ modules, no CommonJS
- camelCase for variables/functions, PascalCase for classes
- Use
const/let, avoidvar - Prefer template literals over string concatenation
- Export classes/functions explicitly, avoid default exports when multiple exports exist
Database
- Use
sqlcfor Go database code generation - SQL files in
db/queries/, schemas indb/{sqlite,postgresql}/schema.sql - Run
just sqlcafter schema changes