aboutsummaryrefslogtreecommitdiffstats
path: root/src/util/encode.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/encode.rs')
-rw-r--r--src/util/encode.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/util/encode.rs b/src/util/encode.rs
index f79c8ea..5762c22 100644
--- a/src/util/encode.rs
+++ b/src/util/encode.rs
@@ -21,6 +21,8 @@
///
/// * [`micromark-util-encode` in `micromark`](https://github.com/micromark/micromark/tree/main/packages/micromark-util-encode)
pub fn encode(value: &str) -> String {
+ // To do: replacing 4 times might just be slow.
+ // Perhaps we can walk the chars.
value
.replace('&', "&")
.replace('"', """)