fix inline code blocks in document. They will still require a fix in the fresh theme to display inline correctly.

This commit is contained in:
Mike Macgirvin 2024-02-05 07:44:32 +11:00
parent 48176d8eb1
commit 5301f394c1
2 changed files with 6 additions and 6 deletions

View file

@ -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.

View file

@ -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','<pre><code>$3</code></pre>',$Text);
// markdown inline code blocks must be preceded by space or linebreak
$Text = preg_replace('#(^|\n| )(?<!\\\)`([^\n`]+?)`#', '$1<code class="inline-code">$2</code>', $Text);
// strip backslash escape for inline code
$Text = preg_replace('#(\\\)`#', '`', $Text);