mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
ressource -> resource
This commit is contained in:
parent
2dd0ef09df
commit
e033525fc3
2 changed files with 6 additions and 6 deletions
|
@ -88,7 +88,7 @@ fn node(s: &str) -> IResult<Node> {
|
||||||
alt((text_node, sound_node, tag_node))(s)
|
alt((text_node, sound_node, tag_node))(s)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A sound tag `[sound:ressource]`, where `ressource` is pointing to a sound or video file.
|
/// A sound tag `[sound:resource]`, where `resource` is pointing to a sound or video file.
|
||||||
fn sound_node(s: &str) -> IResult<Node> {
|
fn sound_node(s: &str) -> IResult<Node> {
|
||||||
map(
|
map(
|
||||||
delimited(tag("[sound:"), is_not("]"), tag("]")),
|
delimited(tag("[sound:"), is_not("]"), tag("]")),
|
||||||
|
|
|
@ -45,8 +45,8 @@ trait Write {
|
||||||
buf.push_str(txt);
|
buf.push_str(txt);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn write_sound(&mut self, buf: &mut String, ressource: &str) {
|
fn write_sound(&mut self, buf: &mut String, resource: &str) {
|
||||||
write!(buf, "[sound:{}]", ressource).unwrap();
|
write!(buf, "[sound:{}]", resource).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
fn write_tag(&mut self, buf: &mut String, tag: &Tag) {
|
fn write_tag(&mut self, buf: &mut String, tag: &Tag) {
|
||||||
|
@ -108,7 +108,7 @@ impl AvStripper {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Write for AvStripper {
|
impl Write for AvStripper {
|
||||||
fn write_sound(&mut self, _buf: &mut String, _ressource: &str) {}
|
fn write_sound(&mut self, _buf: &mut String, _resource: &str) {}
|
||||||
|
|
||||||
fn write_tts_tag(&mut self, _buf: &mut String, _tag: &TtsTag) {}
|
fn write_tts_tag(&mut self, _buf: &mut String, _tag: &TtsTag) {}
|
||||||
}
|
}
|
||||||
|
@ -141,11 +141,11 @@ impl<'a> AvExtractor<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Write for AvExtractor<'_> {
|
impl Write for AvExtractor<'_> {
|
||||||
fn write_sound(&mut self, buf: &mut String, ressource: &str) {
|
fn write_sound(&mut self, buf: &mut String, resource: &str) {
|
||||||
self.write_play_tag(buf);
|
self.write_play_tag(buf);
|
||||||
self.tags.push(pb::AvTag {
|
self.tags.push(pb::AvTag {
|
||||||
value: Some(pb::av_tag::Value::SoundOrVideo(
|
value: Some(pb::av_tag::Value::SoundOrVideo(
|
||||||
decode_entities(ressource).into(),
|
decode_entities(resource).into(),
|
||||||
)),
|
)),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue