mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 01:06:35 -04:00
fix comment + copy/paste error
This commit is contained in:
parent
459f224c6e
commit
2f434dd74d
1 changed files with 4 additions and 4 deletions
|
@ -438,9 +438,9 @@ pub(crate) fn encode_iri_paths(unescaped_html: &str) -> Cow<str> {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/// URI-decode unescaped local paths in HTML fragment.
|
/// URI-decode escaped local paths in HTML fragment.
|
||||||
pub(crate) fn decode_iri_paths(unescaped_html: &str) -> Cow<str> {
|
pub(crate) fn decode_iri_paths(escaped_html: &str) -> Cow<str> {
|
||||||
transform_html_paths(unescaped_html, |fname| {
|
transform_html_paths(escaped_html, |fname| {
|
||||||
match PctStr::new(fname) {
|
match PctStr::new(fname) {
|
||||||
Ok(s) => s.decode().into(),
|
Ok(s) => s.decode().into(),
|
||||||
Err(_e) => {
|
Err(_e) => {
|
||||||
|
@ -452,7 +452,7 @@ pub(crate) fn decode_iri_paths(unescaped_html: &str) -> Cow<str> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Apply a transform to local filename references in tags like IMG.
|
/// Apply a transform to local filename references in tags like IMG.
|
||||||
/// Required to display time, as Anki unfortunately stores the references
|
/// Required at display time, as Anki unfortunately stores the references
|
||||||
/// in unencoded form in the database.
|
/// in unencoded form in the database.
|
||||||
fn transform_html_paths<F>(html: &str, transform: F) -> Cow<str>
|
fn transform_html_paths<F>(html: &str, transform: F) -> Cow<str>
|
||||||
where
|
where
|
||||||
|
|
Loading…
Reference in a new issue