aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--renderer/src/html/tests.rs22
-rw-r--r--rst/src/main.rs3
2 files changed, 24 insertions, 1 deletions
diff --git a/renderer/src/html/tests.rs b/renderer/src/html/tests.rs
index 5d63fcb..6387238 100644
--- a/renderer/src/html/tests.rs
+++ b/renderer/src/html/tests.rs
@@ -338,6 +338,28 @@ paragraph</p>
");
}
+#[test]
+fn comments() {
+ check_renders_to("\
+.. Run-in
+ comment
+
+..
+
+ block-like
+
+ with blank lines
+", "\
+<!--Run-in
+comment
+-->
+<!--block-like
+
+with blank lines
+-->\
+");
+}
+
/*
#[test]
fn test_field_list() {
diff --git a/rst/src/main.rs b/rst/src/main.rs
index 3c0b8e5..318bcb6 100644
--- a/rst/src/main.rs
+++ b/rst/src/main.rs
@@ -35,7 +35,8 @@ fn main() -> CliResult {
let args = Cli::from_args();
args.verbosity.setup_env_logger("rst")?;
- let content = read_file(args.file)?;
+ // TODO: somehow make it work without replacing tabs
+ let content = read_file(args.file)?.replace('\t', " ".repeat(8).as_ref());
let document = parse(&content)?;
let stdout = std::io::stdout();
match args.format {