| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
They really use the same framework, so for now a unit test for like
posts is sufficient. Of course, for proper coverage, one can introduce
tests for bookmarks too, especially if one chooses to render them
differently. The logic will be pretty much the same though.
Replies might use the same logic, since those are also
Webmention-oriented posts.
(It looks like another way to classify MF2 documents is slowly forming
in my brain. Maybe I should write about it on my blog.)
|
|
|
|
|
|
|
| |
There were lots of unneccesary Option::unwrap() invocations that could
be replaced with `if let` statements. This makes the code cleaner and
less likely to panic in case a corrupted, incomplete or manually
injected MF2-JSON document needs to be rendered.
|
|
|
|
| |
Now everyone will know where to get my software if they see it.
|
|
|
|
|
|
| |
It mostly checks the same old things as with notes, but does check for
a name (and as it's explicitly provided, it does work with the buggy
version of the `microformats` crate.
|
|
|
|
|
|
|
|
|
|
| |
New generators include:
- Articles (h-entry with a name)
- Replies (notes with an in-reply-to)
- Likes (h-entries with a like-of)
For replies and likes, there are variants with an h-cite (full reply
context) or a link (partial reply context).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These unit tests generate a random MF2-JSON post, convert it to
MF2-HTML using the template and then read it back using the
`microformats` crate.
The only problem is that it has a nasty bug with overstuffing implied
properties. This is being worked on:
https://gitlab.com/maxburon/microformats-parser/-/issues/7
For now the tests marked as ignored because they fail. But the
function itself that generates them should remain here for
documentation and potential code sharing with the `microformats`
crate, potentially even migrating to a subcrate there.
|
|
Templates and utility types are now separate crates to speed up
compilation, linting and potential reuse/replacement.
Potentially more crates could be split out/modularized, resulting in
speedups, smaller binaries (whenever features are excluded) and even
more reuse capabilities.
|