Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
da3510b5
Commit
da3510b5
authored
Apr 13, 2016
by
Robert Knight
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests for math rendering
parent
8ae5ed46
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
render-markdown-test.js
h/static/scripts/test/render-markdown-test.js
+19
-2
No files found.
h/static/scripts/test/render-markdown-test.js
View file @
da3510b5
...
...
@@ -51,9 +51,26 @@ describe('render-markdown', function () {
});
});
describe
(
'math
rendering
'
,
function
()
{
it
(
'should render LaTeX'
,
function
()
{
describe
(
'math
blocks
'
,
function
()
{
it
(
'should render LaTeX
blocks
'
,
function
()
{
assert
.
equal
(
render
(
'$$x*2$$'
),
'math:
\\
displaystyle {x*2}'
);
});
it
(
'should render mixed blocks'
,
function
()
{
assert
.
equal
(
render
(
'one $$x*2$$ two $$x*3$$ three'
),
'<p>one </p>math:
\\
displaystyle {x*2}<p>two </p>'
+
'math:
\\
displaystyle {x*3}<p>three</p>'
);
});
});
describe
(
'inline math'
,
function
()
{
it
(
'should render inline LaTeX'
,
function
()
{
assert
.
equal
(
render
(
'
\\
(x*2
\\
)'
),
'<p>math:x*2</p>'
);
});
it
(
'should render mixed inline LaTeX blocks'
,
function
()
{
assert
.
equal
(
render
(
'one
\\
(x+2
\\
) two
\\
(x+3
\\
) four'
),
'<p>one math:x+2 two math:x+3 four</p>'
);
});
});
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment