Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GitLab
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
projects.thm.de
GitLab
Commits
954bfb5d
Commit
954bfb5d
authored
Feb 12, 2018
by
Jose Ivan Vargas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Addressed mr observations
parent
c833a09d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
19 deletions
+12
-19
app/assets/javascripts/render_math.js
app/assets/javascripts/render_math.js
+5
-8
config/webpack.config.js
config/webpack.config.js
+0
-2
package.json
package.json
+1
-1
yarn.lock
yarn.lock
+6
-8
No files found.
app/assets/javascripts/render_math.js
View file @
954bfb5d
...
...
@@ -28,13 +28,10 @@ function renderWithKaTeX(elements, katex) {
export
default
function
renderMath
(
$els
)
{
if
(
!
$els
.
length
)
return
;
import
(
/* webpackChunkName: 'katex' */
'
katex
'
).
then
((
katex
)
=>
{
import
(
/* webpackChunkName: 'katex' */
'
katex/dist/katex.css
'
)
.
then
(()
=>
{
renderWithKaTeX
(
$els
,
katex
);
})
.
catch
((
err
)
=>
{
flash
(
`Can't load katex css
${
err
}
`
);
});
Promise
.
all
([
import
(
/* webpackChunkName: 'katex' */
'
katex
'
),
import
(
/* webpackChunkName: 'katex' */
'
katex/dist/katex.css
'
),
]).
then
(([
katex
])
=>
{
renderWithKaTeX
(
$els
,
katex
);
}).
catch
(()
=>
flash
(
__
(
'
An error occurred while rendering KaTeX
'
)));
}
config/webpack.config.js
View file @
954bfb5d
...
...
@@ -156,7 +156,6 @@ var config = {
{
test
:
/katex.css$/
,
include
:
/node_modules
\/
katex
\/
dist/
,
exclude
:
/
(
vendor
\/
assets
)
/
,
use
:
[
{
loader
:
'
style-loader
'
},
{
...
...
@@ -170,7 +169,6 @@ var config = {
{
test
:
/
\.(
eot|ttf|woff|woff2
)
$/
,
include
:
/node_modules
\/
katex
\/
dist
\/
fonts/
,
exclude
:
/
(
vendor
\/
assets
)
/
,
loader
:
'
file-loader
'
,
options
:
{
name
:
'
[name].[hash].[ext]
'
,
...
...
package.json
View file @
954bfb5d
...
...
@@ -56,7 +56,7 @@
"
js-cookie
"
:
"
^2.1.3
"
,
"
jszip
"
:
"
^3.1.3
"
,
"
jszip-utils
"
:
"
^0.0.2
"
,
"
katex
"
:
"
^0.
9.0-alpha2
"
,
"
katex
"
:
"
^0.
8.3
"
,
"
marked
"
:
"
^0.3.12
"
,
"
monaco-editor
"
:
"
0.10.0
"
,
"
mousetrap
"
:
"
^1.4.6
"
,
...
...
yarn.lock
View file @
954bfb5d
...
...
@@ -4401,11 +4401,11 @@ karma@^2.0.0:
tmp "0.0.33"
useragent "^2.1.12"
katex@^0.
9.0-alpha2
:
version "0.
9.0-alpha2
"
resolved "https://registry.yarnpkg.com/katex/-/katex-0.
9.0-alpha2.tgz#f559e8bb32969082d735d949960b7df133fd5831
"
katex@^0.
8.3
:
version "0.
8.3
"
resolved "https://registry.yarnpkg.com/katex/-/katex-0.
8.3.tgz#909d99864baf964c3ccae39c4a99a8e0fb9a1bd0
"
dependencies:
match-at "^0.1.
1
"
match-at "^0.1.
0
"
kind-of@^3.0.2:
version "3.1.0"
...
...
@@ -4797,7 +4797,7 @@ marked@^0.3.12:
version "0.3.12"
resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.12.tgz#7cf25ff2252632f3fe2406bde258e94eee927519"
match-at@^0.1.
1
:
match-at@^0.1.
0
:
version "0.1.1"
resolved "https://registry.yarnpkg.com/match-at/-/match-at-0.1.1.tgz#25d040d291777704d5e6556bbb79230ec2de0540"
...
...
@@ -7093,20 +7093,18 @@ strip-json-comments@~2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
<<<<<<< HEAD
style-loader@^0.19.1:
version "0.19.1"
resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.19.1.tgz#591ffc80bcefe268b77c5d9ebc0505d772619f85"
dependencies:
loader-utils "^1.0.2"
schema-utils "^0.3.0"
=======
subarg@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/subarg/-/subarg-1.0.0.tgz#f62cf17581e996b48fc965699f54c06ae268b8d2"
dependencies:
minimist "^1.1.0"
>>>>>>> master
supports-color@^2.0.0:
version "2.0.0"
...
...
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