Commit graph

2323 commits

Author SHA1 Message Date
hoijui
6b913a5721 also use gfm header generation in test and debug configuraitons
Signed-off-by: hoijui <hoijui.quaero@gmail.com>
2019-10-30 17:46:31 +01:00
hoijui
3be40b23d1 fix gfm header link generation with respect to deduplicatedHeaderId
Signed-off-by: hoijui <hoijui.quaero@gmail.com>
2019-10-30 17:46:24 +01:00
hoijui
cfa2ec38c5 document linkifyHeaderStyle in default.js
Signed-off-by: hoijui <hoijui.quaero@gmail.com>
2019-10-30 17:46:17 +01:00
hoijui
47009805b3 linkifyHeaderStyle needs no string-ification; is already str.
Co-Authored-By: Yukai Huang <yukaihuangtw@gmail.com>
Signed-off-by: hoijui <hoijui.quaero@gmail.com>
2019-10-30 17:46:04 +01:00
Sheogorath
95aa0ee47b
Merge pull request #217 from cloudron-io/lutim_crash
Fix crash in lutim integration
2019-10-30 08:58:23 +01:00
Girish Ramakrishnan
c034ee5571 Fix crash in lutim integration
Signed-off-by: Girish Ramakrishnan <girish@cloudron.io>
2019-10-29 20:23:13 -07:00
Sheogorath
01bff246b0
Merge pull request #210 from davidmehren/mathjax_fix
Fix compatibility with MathJax 2.7.6
2019-10-29 14:18:38 +01:00
Sheogorath
31803d6730
Merge pull request #209 from davidmehren/webpack_docs
Improve webpack dev documentation
2019-10-29 14:18:14 +01:00
Sheogorath
68ee654c16
Merge pull request #212 from davidmehren/webpack_cleanup
Remove unused webpack plugins from package.json
2019-10-29 14:17:41 +01:00
Sheogorath
ed5dd43868
Merge pull request #215 from SISheogorath/upgrade/database-versions
Upgrade all ORM/database related packages
2019-10-29 14:17:17 +01:00
Sheogorath
402dc7095e
Upgrade all ORM/database related packages
This patch provides some major upgrades to all database backend library.
It also fixes an issues that appears since the change from sequelize v3
to v5 where mariadb was originally handled by mysql2 and is now handled
by an own mariadb library.

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2019-10-28 01:43:22 +01:00
Sheogorath
d19c8102a3
Merge pull request #208 from jfowl/doc-change-to-yarn
Replace `npm` with `yarn` commands in docs.
2019-10-28 01:12:17 +01:00
David Mehren
17f2a11310
Remove unused webpack plugins from package.json
Signed-off-by: David Mehren <dmehren1@gmail.com>
2019-10-25 21:54:09 +02:00
David Mehren
88b855beb2
Fix compatibility with MathJax 2.7.6
Signed-off-by: David Mehren <dmehren1@gmail.com>
2019-10-25 21:50:48 +02:00
David Mehren
b714baa36e
Improve webpack dev documentation
Signed-off-by: David Mehren <dmehren1@gmail.com>
2019-10-25 20:52:15 +02:00
Jonas Zohren
625f4e336b Replaces npm with yarn commands in docs.
Signed-off-by: Jonas Zohren <jonas.zohren@tu-dortmund.de>
2019-10-25 19:51:13 +02:00
Sheogorath
20a67e3446
Update yarn.lock 2019-10-23 21:21:35 +02:00
Sheogorath
7a27579589
Merge pull request #205 from hoijui/linkifyHeaderStyle
Allow to generate lower case header references through the config
2019-10-23 21:18:57 +02:00
Sheogorath
3db757754f
Merge pull request #206 from SISheogorath/fix/CVE-2019-15499
Don't accept sandbox attribute
2019-10-22 19:30:23 +02:00
RyotaK
8494f6a085
Don't accept sandbox attribute
Because sandbox is whitelist attribute, attacker will be able to create iframe that has more permission than default.

Signed-off-by: RyotaK <49341894+ry0tak@users.noreply.github.com>
2019-10-22 12:04:12 +02:00
hoijui
e654ca8a31 Allow to generate lower case header references through the config
This makes the references consistent/compatible with GitHub,
GitLab, Pandoc and many other tools.

This behavior can be enabled in config.json with:

```
"linkifyHeaderStyle": "gfm"
```

Signed-off-by: hoijui <hoijui.quaero@gmail.com>
2019-10-22 09:05:37 +02:00
hoijui
20adab2f32 slight doc comment touch-up/simplification [minor]
Signed-off-by: hoijui <hoijui.quaero@gmail.com>
2019-10-22 09:02:40 +02:00
Sheogorath
145285abf6
Merge pull request #200 from ErikMichelson/docs/api
Add API documentation (#172)
2019-10-20 13:11:37 +02:00
Erik Michelson
ae4d5c619a
Fixed JSON syntax error in api doc example
Signed-off-by: Erik Michelson <erik@liltv.de>
2019-10-18 10:59:39 +02:00
Erik Michelson
b7c02a901f
Finishing openapi doc
version 1.6.0 is noted as this document already contains the 1.6.0 endpoint /new/alias

Signed-off-by: Erik Michelson <erik@liltv.de>
2019-10-17 23:26:48 +02:00
Erik Michelson
93ca037a75
WIP: Adding openapi doc
Signed-off-by: Erik Michelson <erik@liltv.de>
2019-10-15 00:58:40 +02:00
Erik Michelson
447d9bc1d8
Added API-doc as markdown file
Signed-off-by: Erik Michelson <erik@liltv.de>
2019-10-13 01:34:09 +02:00
Sheogorath
ce99a79352
Merge pull request #199 from SISheogorath/fix/opengraph
Fix broken error template due to missing opengraph
2019-10-12 19:48:09 +02:00
Sheogorath
7e5bb8a24b
Fix broken error template due to missing opengraph
This regression bug was caused by the error page using the `codimd/head`
template. This resulted in error messages like this:

```
ReferenceError: /codimd/public/views/error.ejs:5
    3|
    4| <head>
 >> 5|     <%- include codimd/head %>
    6|     <link rel="stylesheet" href="<%- serverURL %>/css/center.css">
    7| </head>
    8|
/codimd/public/views/codimd/head.ejs:7
    5| <meta name="apple-mobile-web-app-status-bar-style" content="black">
    6| <meta name="mobile-web-app-capable" content="yes">
 >> 7| <% for (var og in opengraph) { %>
    8| <% if (opengraph.hasOwnProperty(og) && opengraph[og].trim() !== '') { %>
    9| <meta property="og:<%- og %>" content="<%- opengraph[og] %>">
    10| <% }} if (!opengraph.hasOwnProperty('image')) { %>
opengraph is not defined
    at eval (eval at compile (/codimd/node_modules/ejs/lib/ejs.js:618:12), <anonymous>:18:23)
    at eval (eval at compile (/codimd/node_modules/ejs/lib/ejs.js:618:12), <anonymous>:99:10)
    at returnedFn (/codimd/node_modules/ejs/lib/ejs.js:653:17)
    at tryHandleCache (/codimd/node_modules/ejs/lib/ejs.js:251:36)
    at View.exports.renderFile [as engine] (/codimd/node_modules/ejs/lib/ejs.js:482:10)
    at View.render (/codimd/node_modules/express/lib/view.js:135:8)
    at tryRender (/codimd/node_modules/express/lib/application.js:640:10)
    at Function.render (/codimd/node_modules/express/lib/application.js:592:3)
    at ServerResponse.render (/codimd/node_modules/express/lib/response.js:1012:7)
    at responseError (/codimd/lib/response.js:57:20)
    at Object.errorNotFound (/codimd/lib/response.js:30:5)
    at newNote (/codimd/lib/response.js:134:76)
    at /codimd/lib/response.js:172:16
    at tryCatcher (/codimd/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/codimd/node_modules/bluebird/js/release/promise.js:517:31)
    at Promise._settlePromise (/codimd/node_modules/bluebird/js/release/promise.js:574:18)
    at Promise._settlePromise0 (/codimd/node_modules/bluebird/js/release/promise.js:619:10)
    at Promise._settlePromises (/codimd/node_modules/bluebird/js/release/promise.js:699:18)
    at _drainQueueStep (/codimd/node_modules/bluebird/js/release/async.js:138:12)
    at _drainQueue (/codimd/node_modules/bluebird/js/release/async.js:131:9)
    at Async._drainQueues (/codimd/node_modules/bluebird/js/release/async.js:147:5)
    at Immediate.Async.drainQueues (/codimd/node_modules/bluebird/js/release/async.js:17:14)

```

The fix for that is rather trivial. We simply provide an empty array of
metadata when generating the error template.

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2019-10-11 17:03:09 +02:00
Sheogorath
cd34a8c702
Merge pull request #191 from ErikMichelson/feature/ogmetadata
Add customizable opengraph metadata for notes (see #40)
2019-10-10 14:55:34 +02:00
Sheogorath
3255649917
Merge pull request #192 from MartinTuroci/master
Add Slovak locale
2019-10-10 11:25:48 +02:00
Sheogorath
1fefdd893f
Merge pull request #194 from codimd/snyk-fix-27d859743049494e0baa12ce95beef65
[Snyk] Fix for 1 vulnerabilities
2019-10-10 11:23:16 +02:00
snyk-bot
72f74b1b23 fix: package.json to reduce vulnerabilities
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-MARKDOWNIT-459438
2019-10-10 05:32:44 +00:00
Erik Michelson
f26f48793f
Fixed bugs, added default image
Signed-off-by: Erik Michelson <erik@liltv.de>
2019-10-09 23:01:43 +02:00
Sheogorath
344c868f28 Update ar.json (POEditor.com) 2019-10-08 17:05:45 +02:00
Sheogorath
766d112b50 Update pl.json (POEditor.com) 2019-10-08 17:05:43 +02:00
Sheogorath
ee1b47d4ae Update id.json (POEditor.com) 2019-10-08 17:05:42 +02:00
Sheogorath
7a87d6236e Update de.json (POEditor.com) 2019-10-08 17:05:40 +02:00
Sheogorath
ef018ca60d Update en.json (POEditor.com) 2019-10-08 17:05:38 +02:00
Sheogorath
588ee8301c Update zh-TW.json (POEditor.com) 2019-10-08 17:05:37 +02:00
Martin Turoci
c1f629161b Slovak locale
Signed-off-by: Martin Turoci <martinturoci@gmail.com>
2019-10-05 22:32:47 +02:00
Sheogorath
7c78e29e2a
Merge pull request #189 from PetrTodorov/master
Added Czech translation
2019-10-05 13:31:39 +02:00
Sheogorath
09cf1057ef
Merge pull request #187 from Amolith/master
remove legacy code to solve #58
2019-10-05 13:30:38 +02:00
Erik Michelson
8f61d840de
Added documentation for opengraph metadata
Signed-off-by: Erik Michelson <erik@liltv.de>
2019-10-04 19:58:02 +02:00
Erik Michelson
2881f8211a
Added customizable og-metadata to notes
Signed-off-by: Erik Michelson <erik@liltv.de>
2019-10-04 19:49:45 +02:00
Erik Michelson
116bd7230c
Added og-metadata to index page
- image and URL properties are only included if
 the server url is set, because opengraph
 protocol does not support relative links

Signed-off-by: Erik Michelson <erik@liltv.de>
2019-10-04 11:04:58 +02:00
PetrTodorov
f0a8ff5eb3 Added Czech translation
Signed-off-by: PetrTodorov <info@petrtodorov.cz>
2019-10-03 23:02:03 +02:00
Amolith
71e900e9e8
remove unused variable to pass ci testing - #58
Signed-off-by: Amolith <amolith@nixnet.xyz>
2019-10-03 09:24:46 -04:00
Amolith
e6eab33e2d
remove legacy code to solve #58
Signed-off-by: Amolith <amolith@nixnet.xyz>
2019-10-03 08:39:51 -04:00
Sheogorath
7182fecf5b
Merge pull request #186 from codimd/snyk-fix-67ec214d52c0e9b5cf1620e19ace6b1a
[Snyk] Fix for 1 vulnerabilities
2019-09-30 12:59:37 +02:00