Compare two route-D pages with pdfTeX
This commit is contained in:
1 parent
180c05e425
commit
68d2cef346
3 files changed
+166
-11
No files matched your search
+1
-10
@@ -51,7 +51,7 @@ pub fn project_preview_json(project_id: &str, source: &str) -> Result<String, St
|
||||
.lock()
|
||||
.map_err(|_| "route-D session lock".to_string())?;
|
||||
let previous = sessions.remove(project_id);
|
||||
let (mut engine, changed, recomputed) = match previous {
|
||||
let (engine, changed, recomputed) = match previous {
|
||||
Some(session)
|
||||
if session.paragraphs.len() == texts.len()
|
||||
&& session
|
||||
@@ -105,15 +105,6 @@ pub fn project_preview_json(project_id: &str, source: &str) -> Result<String, St
|
||||
Ok(json)
|
||||
}
|
||||
|
||||
/// Build a JSON preview from the document body of a small LaTeX file.
|
||||
///
|
||||
/// This is the opt-in M7 bridge for v1 projects: the preamble is discarded and
|
||||
/// the body is handed to the same route-D paragraph parser used by
|
||||
/// `/api/route-d/preview`. The v1 semantic pipeline remains the default.
|
||||
pub fn latex_preview_json(source: &str) -> Result<String, String> {
|
||||
preview_json(latex_body(source))
|
||||
}
|
||||
|
||||
/// Build a JSON preview from blank-line-separated plain-text paragraphs.
|
||||
pub fn preview_json(source: &str) -> Result<String, String> {
|
||||
let paragraphs = paragraphs(source)?;
|
||||
|
||||
Reference in new issue
Block a user