summaryrefslogtreecommitdiff
path: root/public/js/extra.js (unfollow)
Commit message (Collapse)AuthorFilesLines
2019-10-30make standard conform [fix]hoijui1-8/+5
Signed-off-by: hoijui <hoijui.quaero@gmail.com>
2019-10-30make `headerIds` `const` [fix]hoijui1-1/+1
Signed-off-by: hoijui <hoijui.quaero@gmail.com>
2019-10-30fix gfm header link generation with respect to `deduplicatedHeaderId`hoijui1-19/+69
Signed-off-by: hoijui <hoijui.quaero@gmail.com>
2019-10-22Allow to generate lower case header references through the confighoijui1-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>
2019-10-22slight doc comment touch-up/simplification [minor]hoijui1-3/+3
Signed-off-by: hoijui <hoijui.quaero@gmail.com>
2019-05-31Fix eslint warningsSheogorath1-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>
2019-04-16Fix stored XSS in the graphviz error message rendering [Security Issue]Max Wu1-6/+7
Signed-off-by: Max Wu <jackymaxj@gmail.com> Co-Authored-By: Sheogorath <sheogorath@shivering-isles.com>
2019-03-09Fix broken HTML export with emojisSheogorath1-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>
2019-02-21Remove broken speakerdeck embeddingSheogorath1-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>
2018-11-19Fix wrong anchorsSheogorath1-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>
2018-10-31Again: Replace emoji-plugin regexSheogorath1-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>
2018-10-29Fix emoji regexSheogorath1-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>
2018-10-10Remove dead package octiconSheogorath1-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>
2018-10-10Fix not rendered autocomplete emojisSheogorath1-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>
2018-10-04Add rel="noopener" to target="_blank" linksSheogorath1-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>
2018-06-24Rebrand HackMD to CodiMDSheogorath1-2/+2
Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-01-24Fix task todo might not toggleMax Wu1-2/+2
which caused by not matching syntax with double dashes correctly
2018-01-19Fix image alt not render properlyWu Cheng-Han1-1/+2
2018-01-16Fix anchor id to keep uppercase charactersMax Wu1-1/+5
id shouldn’t be converted to lowercase since id attribute is case sensitive
2017-10-30Fix mermaid error handlingSheogorath1-2/+7
2017-10-30Use mermaidAPI in mermaid scopeSheogorath1-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
2017-10-21Fix markdown-it gist plugin code closing tagYukai Huang1-1/+1
fix #596
2017-10-05Fix to filter @import CSS syntax in style tag to prevent XSS [Security Issue]Wu Cheng-Han1-4/+9
2017-10-05Fix unescape > symbol inside the style tags to make the CSS worksWu Cheng-Han1-0/+4
2017-05-08style: Fixed variable already declaredBoHong Li1-2/+2
2017-05-05Update to support code block syntax highlighting of gherkinWu Cheng-Han1-1/+2
2017-03-28Drop global variable ui exposingYukai Huang1-3/+6
2017-03-26Update to change makefile syntax highlighting to PrismWu Cheng-Han1-0/+6
2017-03-26Fix code styleWu Cheng-Han1-1/+1
2017-03-26Add support of abcjsWu Cheng-Han1-0/+22
2017-03-22Fix todo list item class might add in wrong elementWu Cheng-Han1-1/+5
2017-03-22Fix unnecessary global calling of owneruiWu Cheng-Han1-1/+1
2017-03-14Fix export html to replace fallen cdn tortue.me to cdnjsWu Cheng-Han1-1/+1
2017-03-14Fix rendering might result XSS attribute on self closing tag [Security Issue]Wu Cheng-Han1-0/+13
2017-03-09Use JavaScript Standard Style (part 2)BoHong Li1-977/+967
Fixed all fail on frontend code.
2017-02-03Fix duplicated headers anchor link not been updated properlyWu Cheng-Han1-1/+1
2017-02-03Fix "[object HTMLCollection] is not iterable!" error in some browsersWu Cheng-Han1-1/+2
2017-02-03Removed UTF-8 BOM in download functionNV1-2/+2
2017-02-02Upgrade viz.js to fix manual workaround and get smaller file sizeWu Cheng-Han1-21/+12
2017-01-13Rename common.js to login.jsYukai Huang1-1/+1
2017-01-05Convert extra.js to es6Yukai Huang1-332/+305
2017-01-04Update to show yaml-metadata and diagram parsing error in the viewWu Cheng-Han1-2/+16
2017-01-04Workaround that graphviz might not recover from errorWu Cheng-Han1-12/+22
2016-12-20Fix mathjax not able to render issueWu Cheng-Han1-1/+8
2016-12-19Update to handle graphviz output empty graphWu Cheng-Han1-0/+1
2016-12-19Remove unused vendor code and add fix related usagesWu Cheng-Han1-2/+2
2016-12-12Update to make TOC syntax be case-insensitiveWu Cheng-Han1-1/+1
2016-11-28Fix header id and text might affects by mathjax tagsWu Cheng-Han1-3/+12
2016-11-28Update to support typescript and jsx syntax highlightingWu Cheng-Han1-1/+3
2016-11-26Optimize hackmd resource packing and load ordersWu Cheng-Han1-1/+1