Commit graph

64 commits

Author SHA1 Message Date
Laura Hausmann
cd76e82a1e
[backend/libmfm] Set correct class for hashtag nodes in MfmConverter 2025-01-16 19:15:54 +01:00
Laura Hausmann
9e37942e9d
[backend/federation] Improve hashtag handling (ISH-651) 2025-01-12 12:27:34 +01:00
Laura Hausmann
113bd98b0e
[backend/drive] Proxy remote media by default 2025-01-09 12:36:34 +01:00
Laura Hausmann
e5fc326531
[backend/masto-client] Adjust line breaks after blockquote when SupportsHtmlFormatting is false 2025-01-07 09:06:27 +01:00
Laura Hausmann
bacd9a9262
[backend/masto-client] Fix missing line break after blockquote when SupportsHtmlFormatting is false 2025-01-07 09:04:04 +01:00
pancakes
dd768242e1 [backend/libmfm] Use double.TryParse instead of try/catch 2025-01-06 03:06:46 +01:00
pancakes
29c5b995dd [backend/libmfm] Render dates in universal time and append " UTC" instead of the offset " +00:00" 2025-01-06 03:06:46 +01:00
pancakes
14cbfaed7c [backend/libmfm] Convert outgoing unixtime nodes to human readable date if possible 2025-01-06 03:06:46 +01:00
Laura Hausmann
45b4792cf8
[backend/libmfm] Remove extraneous line breaks after quote blocks 2025-01-05 04:54:07 +01:00
Laura Hausmann
4d904bc673
[backend/federation] Fix compatibility with AP servers that send <br> without a trailing newline character 2025-01-05 04:32:50 +01:00
Laura Hausmann
fbb9165bec
[backend/libmfm] Deserialize HTML tags to MFM tag nodes instead of symbol nodes 2024-12-19 21:05:30 +01:00
Laura Hausmann
9865f3dde7
[backend/core] Replace MFM line endings during user/note ingestion
This saves significant amounts of time & memory during parsing.
2024-12-15 00:11:31 +01:00
Kopper
149fae3363
[backend] address review 2024-12-13 22:19:31 +01:00
Kopper
1e1364e2bb
[backend/masto-client] Add feature flag for inline media 2024-12-13 22:19:31 +01:00
Kopper
89060599eb
[backend] Implement inline media
Inline media can be created by:

1. Attach media to note as usual
2. Copy media URL (public one, for remote instances)
3. Use the new $[media url ] MFM extension to place it wherever you
   wish. (The trailing space is necessary as the parser currently
   treats the closing ] as a part of the URL)

The Iceshrimp frontend may make this easier later on (by having a
"copy inline MFM" button on attachments, maybe?)

Federates as <img>, <video>, <audio>, or <a download> HTML tags
depending on the media type for interoperability. (<a download> is
not handled for incoming media yet).

The media will also be present in the attachments field, both as a
fallback for instance software that do not support inline media,
but also for MFM federation to discover which media it is allowed to
embed (and metadata like alt text and sensitive-ness). This is not
required for remote instances sending inline media, as it will be
extracted out from the HTML.

The Iceshrimp frontend does not render inline media yet. That is
blocked on #67.
2024-12-13 22:19:30 +01:00
Laura Hausmann
d4a24be837
[backend/libmfm] Fix HTML rendering of link nodes 2024-12-07 20:27:36 +01:00
Laura Hausmann
5a6fbcef13
[backend/libmfm] Fix HTML rendering when text formatting is not supported 2024-12-07 20:20:45 +01:00
Laura Hausmann
5dee8bc783
[parsing] Bump MfmSharp version 2024-12-07 04:41:00 +01:00
Laura Hausmann
00e157cc7e
[parsing] Switch to MfmSharp 2024-12-06 18:14:00 +01:00
Laura Hausmann
d6f4f5bd51
[backend/libmfm] Wrap MFM payloads that cause the parser to time out in a MfmPlainNode 2024-11-27 04:53:24 +01:00
Laura Hausmann
9989aae29e
[backend/libmfm] Set alt text for emoji in public preview 2024-11-22 22:42:25 +01:00
Laura Hausmann
dd7b7634c6
[backend/core] Convert scoped services with request-specific properties to singletons by utilizing AsyncLocal<T> 2024-11-18 19:02:44 +01:00
Laura Hausmann
4356a47b9d
[backend/asp] Make services runtime-discoverable 2024-11-18 19:02:44 +01:00
Laura Hausmann
2ef78e3f41
[parsing] Add strike html tag support, keep italic/bold/strike in html tag form when reserializing 2024-11-17 16:44:05 +01:00
Laura Hausmann
73783fa0ee
[backend/libmfm] Fix MfmSerializer dropping leading & trailing whitespace on recursive calls 2024-11-10 22:24:55 +01:00
Laura Hausmann
525bd02022
[backend/libmfm] Fix broken rendering of mentions of local users in some circumstances (ISH-567)
This was caused because of an inconsistency of whether to set the account domain as a fallback value or not. Therefore, invocations with the mentioned local user host not having a fallback value would cause broken mention rendering, e.g. in bios/profile fields.
2024-10-31 21:24:07 +01:00
Laura Hausmann
fa81be967a
[parsing] Add support for advanced MFM (ISH-257) 2024-10-19 02:37:46 +02:00
Laura Hausmann
9d1a21e2d9
[backend/razor] Move public preview to Blazor SSR (razor components) 2024-10-02 02:17:51 +02:00
Laura Hausmann
7662c28745
[backend/database] Canonicalize punycode host representations to lowercase 2024-10-02 01:16:25 +02:00
Laura Hausmann
b4c2712172
[parsing/tests] Fix tests 2024-09-26 18:49:08 +02:00
Laura Hausmann
c02af726e1
[parsing/mfm] Rework codeblock node parsing & serialization 2024-09-26 01:12:21 +02:00
Laura Hausmann
5b3dec0a08
[parsing/mfm] Further improve codeblock newline handling 2024-09-26 00:37:25 +02:00
Laura Hausmann
0fc667527f
[parsing/mfm] Fix handling of newlines surrounding code blocks 2024-09-26 00:33:26 +02:00
Laura Hausmann
1d4ddb1190
[backend/razor] Display emoji in public preview 2024-09-24 02:17:56 +02:00
Laura Hausmann
c3c85419e4
[backend/libmfm] When converting from HTML, shorten http & -s links with identical text and link components 2024-09-23 01:57:33 +02:00
Laura Hausmann
01b2702af5
[backend/masto-client] Fix blockquote handling for some clients 2024-09-13 02:46:44 +02:00
Laura Hausmann
37707a0712
[backend/mfm] Only use div as root element for public preview in MfmConverter.ToHtmlAsync 2024-09-07 01:57:00 +02:00
Laura Hausmann
ec92483b30
[backend/mfm] Prevent MfmConverter.ToHtmlAsync from generating invalid html trees 2024-09-07 01:57:00 +02:00
Laura Hausmann
4ee4fd53c4
[parsing] Add support for MfmQuoteNode 2024-09-07 01:38:23 +02:00
Laura Hausmann
9c7c5595f3
[backend/masto-client] Fix quote/renote indicators sometimes being rendered incorrectly 2024-07-04 00:38:46 +02:00
Laura Hausmann
df3a7bdfe5
[backend] Apply formatting rules 2024-06-29 01:06:19 +02:00
Laura Hausmann
fd5a524a8c
[backend/libmfm] Add missing @ when rendering unresolved mentions to html 2024-05-17 22:27:16 +02:00
Laura Hausmann
a1120ac1e1
[backend/libmfm] Replace non-breaking space characters with regular spaces when converting from html 2024-05-16 19:30:27 +02:00
Laura Hausmann
54d3c4e8d3
[backend] Fix build 2024-05-01 16:58:44 +02:00
Laura Hausmann
d31860dbb3
[backend/core] Track renote/reply uri for notes where the target is inaccessible at time of ingestion (ISH-287) 2024-04-30 00:15:58 +02:00
Laura Hausmann
5599805196
[backend/libmfm] Fix code block serialization 2024-04-28 23:46:05 +02:00
Laura Hausmann
8c5358efd9
[backend/libmfm] Correctly handle incoming italic html markup 2024-04-28 20:08:26 +02:00
Laura Hausmann
9bd421c3a0
[backend] Replace old MfmParser with the new F# implementation (ISH-112) 2024-03-24 23:10:39 +01:00
Laura Hausmann
f5aa7f6ff6
[backend/libmfm] Improve custom emoji regex 2024-03-17 17:11:47 +01:00
Laura Hausmann
a408fa247a
[backend] Code cleanup 2024-03-17 13:36:08 +01:00