feat(journal): passive matcher for robust multi-line entries
`@command.new` silently drops `!journal\n<content>` because
maubot's parser only treats a *space* as the command/args
delimiter — when a newline immediately follows the command
name, the parser fails to recognise the command at all (no
handler invoked, no error). Real users WILL paste:
!journal
- thing one
- thing two
and lose the entry without any feedback.
Switching to `@command.passive` with a regex that admits
[ \t\r\n] as the delimiter catches every form. Subcommand
dispatch (show/today) moves into the handler body — small
loss of decorator ergonomics, big gain in robustness for the
dominant use case (freeform multi-line entries).
Bumped to 0.2.0 since the structural change warrants a minor
bump (not a fix-level patch).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
153b164284
commit
057ed0ed45
2 changed files with 63 additions and 41 deletions
|
|
@ -1,6 +1,6 @@
|
|||
maubot: 0.1.0
|
||||
id: dev.aiolabs.journal
|
||||
version: 0.1.3
|
||||
version: 0.2.0
|
||||
license: AGPL-3.0-or-later
|
||||
modules:
|
||||
- journal
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue