summaryrefslogtreecommitdiff
path: root/public/js/extra.js (follow)
Commit message (Collapse)AuthorAgeFilesLines
* make standard conform [fix]hoijui2019-10-301-8/+5
| | | | Signed-off-by: hoijui <hoijui.quaero@gmail.com>
* make `headerIds` `const` [fix]hoijui2019-10-301-1/+1
| | | | Signed-off-by: hoijui <hoijui.quaero@gmail.com>
* fix gfm header link generation with respect to `deduplicatedHeaderId`hoijui2019-10-301-19/+69
| | | | Signed-off-by: hoijui <hoijui.quaero@gmail.com>
* Allow to generate lower case header references through the confighoijui2019-10-221-1/+5
| | | | | | | | | | | | | 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>
* slight doc comment touch-up/simplification [minor]hoijui2019-10-221-3/+3
| | | | Signed-off-by: hoijui <hoijui.quaero@gmail.com>
* Fix eslint warningsSheogorath2019-05-311-218/+218
| | | | | | | | | | | Since we are about to release it's time to finally fix our linting. This patch basically runs eslint --fix and does some further manual fixes. Also it sets up eslint to fail on every warning on order to make warnings visable in the CI process. There should no functional change be introduced. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
* Fix stored XSS in the graphviz error message rendering [Security Issue]Max Wu2019-04-161-6/+7
| | | | | | Signed-off-by: Max Wu <jackymaxj@gmail.com> Co-Authored-By: Sheogorath <sheogorath@shivering-isles.com>
* Fix broken HTML export with emojisSheogorath2019-03-091-1/+1
| | | | | | | | | HTML export was broken due to missing alt-attribute for emojis. This patch adds the old alt-element style and restores the exportability this way. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
* Remove broken speakerdeck embeddingSheogorath2019-02-211-28/+7
| | | | | | | | | | | | The current speakerdeck implementation is broken. An alternative implementation using oembed doesn't work due to CORS, which could be solved by proxying the speakerdeck API, but we decided to not do this. This patch provides the link to the speakerdeck presentation instead, and this way doesn't break existing notes. This is right now the best solution we could come up with. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
* Fix wrong anchorsSheogorath2018-11-191-2/+4
| | | | | | | | | | While experimenting with the ToC changes, it became obvious that anchors for those unnamed headers don't work. This patch fixes those links by running the autolinkify twice and make sure linkify only adds links to non-empty ids. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
* Again: Replace emoji-plugin regexSheogorath2018-10-311-7/+6
| | | | | | | | | | | | | | | | The Regex introduced in the last commit[1], was already working quite good. But still resulted in false positives for all URL that contained a second `:`. To fix this once and for all, we craft a simple, but long regex based on all emoji names and use this to match them. We could probably optimize it, but that should also be something the regex engine itself can and should do. [1]: 7e45533c75a3697c916e52e5f4ddff42a38bd3d5 (in this source tree) Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
* Fix emoji regexSheogorath2018-10-291-1/+1
| | | | | | | | | | | | | | | | | | The old regex, adapted from the other plugins, was a bit too open for matching. This leads to matching something like: `This is a sentence: [And something with a: in it.]()` which doesn't become a link anymore. Because the match is: ` [And something with a`. This patch provides a fix for the regex to only match non-space string within the `:`'s. References: - Introducing commit: https://github.com/hackmdio/codimd/commit/2063eb8bdf9c0537e9fcfadd7f587658c72bd281 - Inspirational source of the original RegEx: https://github.com/hackmdio/codimd/blob/2063eb8bdf9c0537e9fcfadd7f587658c72bd281/public/js/extra.js#L1095 Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
* Merge pull request #1006 from SISheogorath/fix/missingEmojisChristoph (Sheogorath) Kern2018-10-221-0/+15
|\ | | | | Fix not rendered autocomplete emojis
| * Fix not rendered autocomplete emojisSheogorath2018-10-101-0/+15
| | | | | | | | | | | | | | | | | | | | Currently we have some emojis that are autocompleted but won't show up in the resulting document. This patch adds all emojis that are pushed to Codemirror and applies them to the markdown rendering process, so they become usable. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
* | Remove dead package octiconSheogorath2018-10-101-1/+1
|/ | | | | | | | Octicon no longer provides its CSS classes and this way is useless in CodiMD. Replacing all used classes in the UI and remove it from build system. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
* Add rel="noopener" to target="_blank" linksSheogorath2018-10-041-1/+3
| | | | | | | | | | The noopener construct protects from some nasty clickjacking attacks. We can apply them savely to all our links since we don't rely on the previously used page. Some more details: https://mathiasbynens.github.io/rel-noopener/ Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
* Rebrand HackMD to CodiMDSheogorath2018-06-241-2/+2
| | | | Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
* Fix task todo might not toggleMax Wu2018-01-241-2/+2
| | | which caused by not matching syntax with double dashes correctly
* Fix image alt not render properlyWu Cheng-Han2018-01-191-1/+2
|
* Fix anchor id to keep uppercase charactersMax Wu2018-01-161-1/+5
| | | id shouldn’t be converted to lowercase since id attribute is case sensitive
* Fix mermaid error handlingSheogorath2017-10-301-2/+7
|
* Use mermaidAPI in mermaid scopeSheogorath2017-10-301-12/+4
| | | | | | | | Introduced by https://github.com/knsv/mermaid/commit/a5b71455271aef1180eefa1054d751dea1885e3f#diff-67ae90c5144c55348a3cbdb078240454L532 Fixes #600 Parse only throws error: https://github.com/knsv/mermaid/commit/167368d508f1e5b1606b2b45f892cdd60d479448#diff-67ae90c5144c55348a3cbdb078240454
* Fix markdown-it gist plugin code closing tagYukai Huang2017-10-211-1/+1
| | | | fix #596
* Fix to filter @import CSS syntax in style tag to prevent XSS [Security Issue]Wu Cheng-Han2017-10-051-4/+9
|
* Fix unescape > symbol inside the style tags to make the CSS worksWu Cheng-Han2017-10-051-0/+4
|
* style: Fixed variable already declaredBoHong Li2017-05-081-2/+2
|
* Update to support code block syntax highlighting of gherkinWu Cheng-Han2017-05-051-1/+2
|
* Drop global variable ui exposingYukai Huang2017-03-281-3/+6
|
* Update to change makefile syntax highlighting to PrismWu Cheng-Han2017-03-261-0/+6
|
* Fix code styleWu Cheng-Han2017-03-261-1/+1
|
* Add support of abcjsWu Cheng-Han2017-03-261-0/+22
|
* Fix todo list item class might add in wrong elementWu Cheng-Han2017-03-221-1/+5
|
* Fix unnecessary global calling of owneruiWu Cheng-Han2017-03-221-1/+1
|
* Fix export html to replace fallen cdn tortue.me to cdnjsWu Cheng-Han2017-03-141-1/+1
|
* Fix rendering might result XSS attribute on self closing tag [Security Issue]Wu Cheng-Han2017-03-141-0/+13
|
* Use JavaScript Standard Style (part 2)BoHong Li2017-03-091-977/+967
| | | | Fixed all fail on frontend code.
* Fix duplicated headers anchor link not been updated properlyWu Cheng-Han2017-02-031-1/+1
|
* Fix "[object HTMLCollection] is not iterable!" error in some browsersWu Cheng-Han2017-02-031-1/+2
|
* Merge pull request #341 from nvsofts/fix_bom_utf8Max Wu2017-02-031-2/+2
|\ | | | | Removed UTF-8 BOM in download function
| * Removed UTF-8 BOM in download functionNV2017-02-031-2/+2
| |
* | Upgrade viz.js to fix manual workaround and get smaller file sizeWu Cheng-Han2017-02-021-21/+12
|/
* Rename common.js to login.jsYukai Huang2017-01-131-1/+1
|
* Merge branch 'master' into frontend-nextYukai Huang2017-01-071-15/+39
|\
| * Update to show yaml-metadata and diagram parsing error in the viewWu Cheng-Han2017-01-041-2/+16
| |
| * Workaround that graphviz might not recover from errorWu Cheng-Han2017-01-041-12/+22
| |
* | Convert extra.js to es6Yukai Huang2017-01-051-332/+305
|/
* Fix mathjax not able to render issueWu Cheng-Han2016-12-201-1/+8
|
* Update to handle graphviz output empty graphWu Cheng-Han2016-12-191-0/+1
|
* Remove unused vendor code and add fix related usagesWu Cheng-Han2016-12-191-2/+2
|
* Update to make TOC syntax be case-insensitiveWu Cheng-Han2016-12-121-1/+1
|