From 7350c7382bda85618c3dae1d74cc8cbe7ddd4b9d Mon Sep 17 00:00:00 2001 From: Klimperfix Date: Tue, 30 Sep 2025 21:49:31 +0200 Subject: Implemented basic sanitizing. The default Regex crate does not support the required regex features, so I'm using the fancy_regex crate that does. --- tests/biblatex-test.bib | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'tests/biblatex-test.bib') diff --git a/tests/biblatex-test.bib b/tests/biblatex-test.bib index cfcdc80..fcc5085 100644 --- a/tests/biblatex-test.bib +++ b/tests/biblatex-test.bib @@ -28,9 +28,9 @@ @article{aksin, title = {Effect of immobilization on catalytic characteristics of saturated {Pd-N}-heterocyclic carbenes in {Mizoroki-Heck} reactions}, - author = {Aks{\i}n, {\"O}zge and T{\"u}rkmen, Hayati and Artok, Levent and { - \c{C}}etinkaya, Bekir and Ni, Chaoying and B{\"u}y{\"u}kg{\"u}ng{\" - o}r, Orhan and {\"O}zkal, Erhan}, + author = {Aks{\i}n, {\"O}zge and T{\"u}rkmen, Hayati and Artok , Levent and + { \c{C}}etinkaya, Bekir and Ni, Chaoying and B{\" u}y{ \"u}kg{\"u} + ng{ \" o}r, Orhan and {\"O}zkal, Erhan}, volume = {691}, number = {13}, pages = {3027--3036}, @@ -82,7 +82,12 @@ langidopts = {variant=american}, file = {~/Documents/coding/projects/bibiman/tests/aristotle_physics.pdf}, annotation = {A \texttt{book} entry with a \texttt{translator} field}, - abstract = {The Physics is a work by Aristotle dedicated to the study of nature. Regarded by Heidegger as "the fundamental work of Western philosophy", it presents the renowned distinction between the four types of cause, as well as reflections on chance, motion, infinity, and other fundamental concepts. It is here that Aristotle sets out his celebrated paradox of time.}, + abstract = {The Physics is a work by Aristotle dedicated to the study of + nature. Regarded by Heidegger as "the fundamental work of Western + philosophy", it presents the renowned distinction between the + four types of cause, as well as reflections on chance, motion, + infinity, and other fundamental concepts. It is here that + Aristotle sets out his celebrated paradox of time.}, } @book{aristotle_poetics, -- cgit v1.2.3 From f84ebacd1ea47b09c58dd1ef1eaaf70feaacbe0f Mon Sep 17 00:00:00 2001 From: lukeflo Date: Sun, 5 Oct 2025 13:16:26 +0200 Subject: add some further text macros to be hidden --- src/bibiman/sanitize/optimized_sanitize.rs | 2 ++ tests/biblatex-test.bib | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'tests/biblatex-test.bib') diff --git a/src/bibiman/sanitize/optimized_sanitize.rs b/src/bibiman/sanitize/optimized_sanitize.rs index 8ee0115..336cc56 100644 --- a/src/bibiman/sanitize/optimized_sanitize.rs +++ b/src/bibiman/sanitize/optimized_sanitize.rs @@ -27,6 +27,8 @@ static LOOKUP: phf::Map<&'static str, (&'static str, Option<&'static str>)> = ph r"\hyphen" => ("-", None), r"\textbf" => ("", Some("")), r"\textit" => ("", Some("")), + r"\texttt" => ("", Some("")), + r"\textsc" => ("", Some("")), }; #[derive(Logos, Debug)] diff --git a/tests/biblatex-test.bib b/tests/biblatex-test.bib index fcc5085..2149e7c 100644 --- a/tests/biblatex-test.bib +++ b/tests/biblatex-test.bib @@ -107,7 +107,7 @@ } @mvbook{aristotle_rhetoric, - title = {The Rhetoric of {Aristotle} with a commentary by the late {Edward + title = {The \textbf{Rhetoric} of {Aristotle} with a commentary by the late {Edward Meredith Cope}}, shorttitle = {Rhetoric}, author = {Aristotle}, @@ -127,7 +127,7 @@ } @book{augustine, - title = {Heterogeneous catalysis for the synthetic chemist}, + title = {Heterogeneous catalysis for the synthetic \textit{chemist}}, shorttitle = {Heterogeneous catalysis}, author = {Augustine, Robert L.}, location = {New York}, @@ -289,7 +289,7 @@ annotation = {An \texttt{article} entry with an \texttt{eid} and a \texttt{ doi} field. Note that the \textsc{doi} is transformed into a clickable link if \texttt{hyperref} support has been enabled}, - abstract = {The computation of ionic solvation free energies from atomistic + abstract = {The computation of \texttt{ionic} solvation free energies from atomistic simulations is a surprisingly difficult problem that has found no satisfactory solution for more than 15 years. The reason is that the charging free energies evaluated from such simulations are -- cgit v1.2.3