Commit Graph

224 Commits

Author SHA1 Message Date
Raccoon e7a5ea813a
Merge pull request #1587 from tamo/more-i18n
Move HTML-related code from JS to EJS to enable more i18n
2021-07-09 15:08:03 +08:00
Max Wu 6b8950d235
Merge pull request #1481 from ghost/lang-attr 2021-07-09 14:59:49 +08:00
Max Wu 2eefe7706f fix: strip html tags for gist file, gist line, gist highlight line, gist show loading attrtributes
Signed-off-by: Max Wu <jackymaxj@gmail.com>
2021-06-16 19:00:04 +08:00
Max Wu 6966881152 fix: strip html tags for gist id to avoid stored XSS on showing error [Security Issue]
Signed-off-by: Max Wu <jackymaxj@gmail.com>
2021-06-16 19:00:04 +08:00
Yukai Huang ee1230b6f4
Merge pull request #1532 from freitagsrunde/feature/customTocLevel
Set TOC depth freely for every note by using YAML metadata or an option within `[toc]`
2021-05-11 17:30:31 +08:00
Yukai Huang 5b4c7ef4bb
Merge pull request #1651 from hackmdio/bugfix/fix-pdf-embed-freeze-on-safari-big-sur
fix: avoid insert embed tag on the main thread which cause Safari on Big Sur freezing
2021-01-25 15:00:57 +08:00
Max Wu 2b9affbc08 fix: code style
Signed-off-by: Max Wu <jackymaxj@gmail.com>
2021-01-21 14:35:16 +08:00
Max Wu 47bab4266b fix: vimeo won't show up due to the jsonp callback data unable be parsed with jQuery
Signed-off-by: Max Wu <jackymaxj@gmail.com>
2021-01-21 14:35:16 +08:00
Max Wu a1e3768f98 fix: avoid insert embed tag on the main thread which cause Safari on Big Sur freezing
upgrade pdfobject to version 2.2.4

Signed-off-by: Max Wu <jackymaxj@gmail.com>
2021-01-21 14:23:45 +08:00
Max Wu 568355acf5 fix: properly validate mermaid syntax and handle parse error
Signed-off-by: Max Wu <jackymaxj@gmail.com>
2020-12-21 14:56:48 +08:00
Max Wu 064dfb7865 fix: disable prefer-const lint rule for mermaid block text string
Signed-off-by: Max Wu <jackymaxj@gmail.com>
2020-12-21 14:49:34 +08:00
Max Wu 8d9a9ab0b2 fix: avoid eval string when putting back parsed string of mermaid
where has stored XSS issue

Signed-off-by: Max Wu <jackymaxj@gmail.com>
2020-12-21 14:24:46 +08:00
Tamotsu Takahashi dec2f98d9b Make "Expand all" translatable
Move HTML from JS to EJS

I don't know how to register i18n helper to handlebars,
so "export to raw HTML" has not been touched.
You can do the same for html.hbs if you want.

Signed-off-by: Tamotsu Takahashi <ttakah@gmail.com>
2020-09-11 12:51:08 +09:00
Yukai Huang cfbae54ef8
Allow specifying option for graphviz
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
2020-08-13 17:46:42 +08:00
Yukai Huang 24de5a54c9
Merge pull request #1559 from hackmdio/feature/update-delete-note-api
Update and delete note api
2020-08-13 15:55:10 +08:00
Yukai Huang 12b8f09d52
Finetune fretboard css
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
2020-08-12 17:21:21 +08:00
James Tsai b3cf98b329 Fix linter
Signed-off-by: James Tsai <jamesscamel@gmail.com>
2020-07-27 18:01:10 +08:00
Yukai Huang 8e72eb5aca
Merge pull request #1548 from hackmdio/feature/list-my-note-api
List-my-note API
2020-07-15 17:13:35 +08:00
Yukai Huang b29d2c0a31 Implement cspreview renderer
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
2020-07-09 17:14:10 +08:00
Max Wu a569881fcf
Merge pull request #1463 from hackmdio/feature/image-lightbox 2020-07-09 16:41:39 +08:00
Raccoon e9cf0431d4
Merge branch 'develop' into feat/mindmap 2020-07-09 15:48:28 +08:00
Yukai Huang 62bbf928b7 Apply image lightbox only in document image
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
2020-07-09 14:01:22 +08:00
Yukai Huang 619aabf116 Implement simple lightbox
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
2020-07-09 14:01:22 +08:00
Ca Chen b957b8bda2 Use brace wrapped param
Signed-off-by: Ca Chen <kiancaca@gmail.com>
2020-07-02 12:48:10 +08:00
Ca Chen 6f580e9be8 1. mv fretboard path to `public/js/lib/renderer`
2. use `string-loader` instead of `svg-inline-loader`

Signed-off-by: Ca Chen <kiancaca@gmail.com>
2020-07-02 12:48:10 +08:00
Ca Chen 2ea3e59842 init ascii fretboard
Signed-off-by: Ca Chen <kiancaca@gmail.com>
2020-07-02 12:48:10 +08:00
James Tsai 07f32f5bbf Fix standard
Signed-off-by: James Tsai <jamesscamel@gmail.com>
2020-07-01 11:42:28 +08:00
Gereon Dusella b15c59e15e added an option to set the TOC depth directly inside the [toc] tag
Signed-off-by: Gereon Dusella <git@gereondusella.de>
2020-06-03 18:32:48 +02:00
Gereon Dusella 56e01fa76e added an Environment Variable `CMD_DEFAULT_TOC_DEPTH` to set default toc depth
Signed-off-by: Gereon Dusella <git@gereondusella.de>
2020-06-03 17:38:28 +02:00
Gereon Dusella 5847bf09bf added an option to set the depth of the table of contents freely for every note
Signed-off-by: Gereon Dusella <git@gereondusella.de>
2020-06-01 22:27:16 +02:00
Yukai Huang 77f4b0590a
Support brace wrapped param in fence lang
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
2020-04-19 16:52:24 +08:00
Raccoon 65b040545c
style: fix markmap height to 300px
Signed-off-by: Raccoon <raccoon@hackmd.io>
2020-04-12 00:59:12 +08:00
Raccoon fb02ee3922
feat: add mindmap-lib support
Signed-off-by: Raccoon <raccoon@hackmd.io>
2020-04-11 23:49:47 +08:00
BinotaLIU 9b899c7778
escape attribute value for lang
Signed-off-by: BinotaLIU <binota@binota.org>
2020-04-10 22:41:38 +08:00
BinotaLIU bdd2de72ba
set default lang attr for note to 'en'
Signed-off-by: BinotaLIU <binota@binota.org>
2020-04-10 22:04:03 +08:00
Yukai Huang 8f4ccb967d
Support inline markdown in spoiler summary
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
2020-03-09 10:15:01 +08:00
BoHong Li 5b5d0417f5
fix(geo-map): fix west longitude and south latitude not parsed correctly
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2020-03-02 14:07:53 +08:00
Max Wu eb27db8f3e fix: use validator.isURL to avoid regex catastrophic backtracking
Signed-off-by: Max Wu <jackymaxj@gmail.com>
2020-02-29 19:51:20 +08:00
Yukai Huang 1a000226b0
fix: unwrap the geo div and throw error when input
location search not found

also fix the CSP rule that the img with data src might be violated

Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
Co-authored-by: Max Wu <jackymaxj@gmail.com>
2020-02-28 15:48:09 +08:00
Yukai Huang e3c460308c
Fix coding style
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
2020-02-27 21:51:10 +08:00
Yukai Huang d857f0d12f
Bundle default leaflet marker images
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
2020-02-27 21:51:10 +08:00
Yukai Huang 0bb3e2614b
Handle geo address lookup
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
2020-02-27 21:51:10 +08:00
Yukai Huang d9851f2a28
Support embed OSM
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
2020-02-27 21:51:10 +08:00
Max Wu 3a5c6fa5ed feat: use svg for vega-lite renderer
Signed-off-by: Max Wu <jackymaxj@gmail.com>
2020-02-27 18:20:41 +08:00
Max Wu 40a04f76f8 fix: catch viz.js render async error and recreate Viz instance
Signed-off-by: Max Wu <jackymaxj@gmail.com>
2020-02-26 16:05:43 +08:00
Yukai Huang 59b31a108d
Remove unused markdown-it-emoji
use emoji markdown-it plugin implemented in 2063eb

Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
2020-02-06 16:43:05 +08:00
Yukai Huang caf4ac61e5
Support emojify.css use cdn
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
2020-02-06 14:31:25 +08:00
Yukai Huang 75ee5ad255
Merge branch 'develop' into feature/configurable-break-style 2019-11-01 10:27:47 +08:00
hoijui 558fa5fcf4 make standard conform [fix]
Signed-off-by: hoijui <hoijui.quaero@gmail.com>
2019-10-29 13:20:18 +01:00
hoijui aaf9466498 make `headerIds` `const` [fix]
Signed-off-by: hoijui <hoijui.quaero@gmail.com>
2019-10-29 11:57:51 +01:00