Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
Test whether footnotes are disabled
Browse files Browse the repository at this point in the history
See GH-155
  • Loading branch information
swsnr committed Sep 1, 2020
1 parent d5772c0 commit e943d8d
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,4 +313,42 @@ Hello Donald[2]
)
}
}

mod disabled_features {
use anyhow::Result;
use pretty_assertions::assert_eq;
use syntect::parsing::SyntaxSet;

use crate::*;

use super::render_string;

fn render(markup: &str) -> Result<String> {
render_string(
markup,
&Settings {
resource_access: ResourceAccess::LocalOnly,
syntax_set: SyntaxSet::default(),
terminal_capabilities: TerminalCapabilities::none(),
terminal_size: TerminalSize::default(),
},
)
}

#[test]
#[allow(non_snake_case)]
fn GH_155_do_not_choke_on_footnoes() {
assert_eq!(
render(
"A footnote [^1]
[^1: We do not support footnotes."
)
.unwrap(),
"A footnote [^1]
[^1: We do not support footnotes.\n"
)
}
}
}

0 comments on commit e943d8d

Please # to comment.