Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix extraneous \< escaping introduced in #1558, fix #1614 #1690

Merged
merged 1 commit into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dfir_lang/src/graph/ops/join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use super::{
};
use crate::diagnostic::{Diagnostic, Level};

/// > 2 input streams of type <(K, V1)> and <(K, V2)>, 1 output stream of type <(K, (V1, V2))>
/// > 2 input streams of type `<(K, V1)>` and `<(K, V2)>`, 1 output stream of type `<(K, (V1, V2))>`
///
/// Forms the equijoin of the tuples in the input streams by their first (key) attribute. Note that the result nests the 2nd input field (values) into a tuple in the 2nd output field.
///
Expand Down
2 changes: 1 addition & 1 deletion dfir_lang/src/graph/ops/join_fused.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use super::{
};
use crate::diagnostic::{Diagnostic, Level};

/// > 2 input streams of type <(K, V1)> and <(K, V2)>, 1 output stream of type <(K, (V1, V2))>
/// > 2 input streams of type `<(K, V1)>` and `<(K, V2)>`, 1 output stream of type `<(K, (V1, V2))>`
///
/// `join_fused` takes two arguments, they are the configuration options for the left hand side and right hand side inputs respectively.
/// There are three available configuration options, they are `Reduce`: if the input type is the same as the accumulator type,
Expand Down
2 changes: 1 addition & 1 deletion dfir_lang/src/graph/ops/join_multiset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use super::{
WriteContextArgs, RANGE_0, RANGE_1,
};

/// > 2 input streams of type <(K, V1)> and <(K, V2)>, 1 output stream of type <(K, (V1, V2))>
/// > 2 input streams of type `<(K, V1)>` and `<(K, V2)>`, 1 output stream of type `<(K, (V1, V2))>`
///
/// This operator is equivalent to `join` except that the LHS and RHS are collected into multisets rather than sets before joining.
///
Expand Down
16 changes: 4 additions & 12 deletions dfir_macro/build.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//! Build script to generate operator book docs.

use std::env::VarError;
use std::fmt::Write as _FmtWrite;
use std::fmt::Write as _;
use std::fs::File;
use std::io::{BufWriter, Read, Result, Write};
use std::io::{BufWriter, Result, Write};
use std::path::{Path, PathBuf};

use dfir_lang::graph::ops::{PortListSpec, OPERATORS};
Expand Down Expand Up @@ -33,16 +33,8 @@ fn write_operator_docgen(op_name: &str, write: &mut impl Write) -> Result<()> {
"../docs/docgen",
&*format!("{}.md", op_name),
]);
let mut read_string = String::new();
File::open(doctest_path)?.read_to_string(&mut read_string)?;
write!(
write,
"{}",
read_string
.split("<!--")
.map(|t| t.replace("<", "\\<"))
.join("<!--")
)?;
let mut read = File::open(doctest_path)?;
std::io::copy(&mut read, write)?;
Ok(())
}

Expand Down
Loading