From 5301f394c1f72e9ccfae8f59eaa870399b57b186 Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Mon, 5 Feb 2024 07:44:32 +1100 Subject: [PATCH] fix inline code blocks in document. They will still require a fix in the fresh theme to display inline correctly. --- doc/develop/en/Containers.mc | 11 +++++------ include/bbcode.php | 1 + 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/develop/en/Containers.mc b/doc/develop/en/Containers.mc index f2ec4db1d..05a43b677 100644 --- a/doc/develop/en/Containers.mc +++ b/doc/develop/en/Containers.mc @@ -19,18 +19,17 @@ In the conversational model, the same basic steps occur, but respects the rights ### Creating a constrained conversation -A constrained conversation is implemented as a Collection. [FEP-400e](https://codeberg.org/fediverse/fep/src/branch/main/fep/400e/fep-400e.md) provides a model for working with collections. In that proposal, ActivityPub objects which are created as part of a collection are indicated by a ```target``` "stub" property containing +A constrained conversation is implemented as a Collection. [FEP-400e](https://codeberg.org/fediverse/fep/src/branch/main/fep/400e/fep-400e.md) provides a model for working with collections. In that proposal, ActivityPub objects which are created as part of a collection are indicated by a `target` "stub" property containing -- type -- (```Collection``` or ```OrderedCollection```) +- type -- (`Collection` or `OrderedCollection`) - id -- a URL where this collection can be found -- attributedTo -- the ```id``` of the collection owner +- attributedTo -- the `id` of the collection owner In a constrained conversation, conforming implementations will implement FEP-400e with some very minor additions: - In a constrained conversation, the target->id and the context are identical. This provides easy identification. - In a constrained conversation, replies SHOULD only be addressed to the target->attributedTo actor. -- When receiving a correctly signed ```Add``` activity, checking that the id of the target is a collection owned by ```actor``` is slightly different from FEP-400e. This can be accomplished by fetching the Collection object and validating the attributedTo field. - -Processing is otherwise identical. In the reference implementation of conversation containers by the streams repository, signed objects are often transmitted instead of just transmitting the ids, and these are signed using a combination of [FEP-521a](https://codeberg.org/fediverse/fep/src/branch/main/fep/c390/fep-521a.md) and [FEP-8b32](https://codeberg.org/fediverse/fep/src/branch/main/fep/8b32/fep-8b32.md). +- When receiving a correctly signed `Add` activity, checking that the id of the target is a collection owned by `actor` is slightly different from FEP-400e. This can be accomplished by fetching the Collection object and validating the attributedTo field. + diff --git a/include/bbcode.php b/include/bbcode.php index 7f34b3feb..af368ac98 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -2178,6 +2178,7 @@ function bbcode($Text, $options = []) // do not use the "indent by tab or 4 spaces" markdown codeblock trigger - this produces way too many false positives // $Text = preg_replace('#^(?:\0(.*?)\0\n)?( {4}|\t)(.*?)$#m','
$3
',$Text); // markdown inline code blocks must be preceded by space or linebreak + $Text = preg_replace('#(^|\n| )(?$2', $Text); // strip backslash escape for inline code $Text = preg_replace('#(\\\)`#', '`', $Text);