Add test cases.
This commit is contained in:
parent
3ab0dd4531
commit
5ad8fdf4b2
@ -0,0 +1,7 @@
|
||||
\begin{itemize}
|
||||
\item foo \sqrt{x}
|
||||
\end{itemize}
|
||||
|
||||
\begin{itemize}
|
||||
\item bar \sqrt{y}
|
||||
\end{itemize} % Need text on this line to prevent it from becoming a LaTeX environment org-mode element
|
1
org_mode_samples/latex_fragment/math_mode.org
Normal file
1
org_mode_samples/latex_fragment/math_mode.org
Normal file
@ -0,0 +1 @@
|
||||
tex can have math between dollar signs like $x^2=y$ and $$ x=+\sqrt{y} $$ but also braces and brackets like \( x=2 \) and \[ x=-\sqrt{2} \]
|
4
org_mode_samples/latex_fragment/simple.org
Normal file
4
org_mode_samples/latex_fragment/simple.org
Normal file
@ -0,0 +1,4 @@
|
||||
\begin{itemize}
|
||||
% this would be a LaTeX comment if this was a LaTeX document
|
||||
\item Heres some math \sqrt{y}
|
||||
\end{itemize} % Need text on this line to prevent it from becoming a LaTeX environment org-mode element
|
@ -12,6 +12,7 @@ use crate::error::Res;
|
||||
use crate::parser::object::Entity;
|
||||
use crate::parser::parser_with_context::parser_with_context;
|
||||
use crate::parser::util::get_consumed;
|
||||
use crate::parser::util::not_yet_implemented;
|
||||
use crate::parser::LatexFragment;
|
||||
|
||||
#[tracing::instrument(ret, level = "debug")]
|
||||
@ -19,6 +20,7 @@ pub fn latex_fragment<'r, 's>(
|
||||
context: Context<'r, 's>,
|
||||
input: &'s str,
|
||||
) -> Res<&'s str, LatexFragment<'s>> {
|
||||
not_yet_implemented()?;
|
||||
let (remaining, _) = tag("\\")(input)?;
|
||||
todo!()
|
||||
// let (remaining, entity_name) = name(context, remaining)?;
|
||||
|
Loading…
Reference in New Issue
Block a user