1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
Description: add feature fencing
Author: Jonas Smedegaard <dr@jones.dk>
Last-Update: 2025-04-13
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/library/src/standards/micropub/query/test.rs
+++ b/library/src/standards/micropub/query/test.rs
@@ -189,6 +189,7 @@
}
#[test]
+#[cfg(all(feature = "experimental_channels", feature = "experimental_syndication"))]
fn query_response_for_configuration() {
assert_eq!(
Ok(Response::Configuration(ConfigurationResponse {
@@ -210,7 +211,7 @@
}
#[test]
-#[cfg(feature = "experimental_syndication")]
+#[cfg(all(feature = "experimental_channels", feature = "experimental_syndication"))]
fn query_response_for_configuration_with_syndication() {
use crate::standards::micropub::extension;
@@ -244,7 +245,7 @@
}
#[test]
-#[cfg(feature = "experimental_channels")]
+#[cfg(all(feature = "experimental_channels", feature = "experimental_syndication"))]
fn query_response_for_configuration_with_channels() {
assert_eq!(
Ok(Response::Configuration(ConfigurationResponse {
--- a/library/src/algorithms/ptd.rs
+++ b/library/src/algorithms/ptd.rs
@@ -9,6 +9,7 @@
types::{Class, KnownClass},
};
use mf2::types::{Fragment, PropertyValue};
+#[cfg(feature = "reaction")]
use regex::Regex;
use std::{
collections::{HashMap, HashSet},
@@ -375,8 +376,10 @@
}
}
+#[cfg(feature = "reaction")]
const RE_IS_ONLY_EMOJI_OR_PICTOGRAPH: OnceLock<Regex> = OnceLock::new();
+#[cfg(feature = "reaction")]
fn has_emoji(text: &str) -> bool {
RE_IS_ONLY_EMOJI_OR_PICTOGRAPH
.get_or_init(|| {
|