summaryrefslogtreecommitdiff
path: root/src/eval/styles.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-01-30 12:50:58 +0100
committerLaurenz <laurmaedje@gmail.com>2022-01-30 22:46:59 +0100
commit8d1ce390e21ce0a5812a4211c893ec359906d6f1 (patch)
tree5dbe1ad96af8ce8f9f01887340fe06025462e959 /src/eval/styles.rs
parentd7072f378fef733ae994fd9a1e767df4e4dd878e (diff)
Rework strong and emph
- Star and underscore not parsed as strong/emph inside of words - Stars/underscores must be balanced and they cannot go over paragraph break - New `strong` and `emph` classes
Diffstat (limited to 'src/eval/styles.rs')
-rw-r--r--src/eval/styles.rs13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/eval/styles.rs b/src/eval/styles.rs
index bdc01f1f..508996a1 100644
--- a/src/eval/styles.rs
+++ b/src/eval/styles.rs
@@ -87,19 +87,6 @@ impl StyleMap {
}
}
- /// Toggle a boolean style property, removing it if it exists and inserting
- /// it with `true` if it doesn't.
- pub fn toggle<P: Property<Value = bool>>(&mut self, key: P) {
- for (i, entry) in self.0.iter_mut().enumerate() {
- if entry.is::<P>() {
- self.0.swap_remove(i);
- return;
- }
- }
-
- self.0.push(Entry::new(key, true));
- }
-
/// Mark all contained properties as _scoped_. This means that they only
/// apply to the first descendant node (of their type) in the hierarchy and
/// not its children, too. This is used by class constructors.