Commit Graph

46 Commits

Author SHA1 Message Date
Felix Häusler
5bb7856cb4
Add GitLab math block support (#2119) 2020-06-04 01:31:21 +02:00
Ran Luo
1d69461502
fix: empty blockquote issue (#1739) 2019-11-22 19:00:15 +08:00
Ran Luo
fed4eafcca
Merge branch 'develop' into fix-1578 2019-11-02 23:52:41 +08:00
jocs
d7b655ac6c fix #1578 2019-11-02 10:46:39 +08:00
罗冉
efd38644cd feat: fix [^longnote] is not auto numbered in exported document but in footnotes. 2019-10-30 11:36:39 +08:00
罗冉
8886517c3a fix some bugs 2019-10-29 18:48:20 +08:00
罗冉
5061548784 add export html 2019-10-29 17:32:53 +08:00
Ran Luo
e18ad566d5 Add muya API extractImages (#1507) 2019-10-24 21:07:05 +02:00
Ran Luo
289b17c015 Optimization of table block (#1456)
* Prepare for drag and drop row and column

* remove regexp th|td

* render drag button

* Feat: support drag and drop row and column of table

* Feat: table bar tools

* remove unnecessary codes

* Feat: support select multiple cells

* Do not show table drag bar when selected cells

* Feat: support delete selected cells content or remove row/column/table

* Feat: select one cell or table when press ctrl + a

* Support select all content

* Remove table tools in context menu

* Feat: support copy paste selected cells as sub table

* Fix: PR issue 1 press tab will not show the table drag bars

* Select one cell and press backspace will cause bug

* Fix: The table drag bar location error when there are tow tables in the editor

* Fix unable copy and paste 1* n or n * 1 table

* Drag any row to the top to editor will cause error.

* Update table resize icon

* Fix: table resize is not work in table tool bar

* Fix: No need to show left drag bar if only one row, and no need to show bottom drag bar if only one column.

* Fix: Create an empty table in source code mode, turn to preview mode, there are more than two drag bars in one table.

* Fix: resize table

* Opti: table is not 100% width now

* Fix drag in one row or column

* Change table delete icon

* Fix: backspace is not work

* Little style opti

* Fix: cmd + enter bug

* Update the table drag bar context menu text

* Handle delete key when select table cells

* remove all unnecessary debug codes

* Feat: support cut selected cells and copy/cut by context menu

* Fix typo

* Rename some methods name

* Fix an issue when drag and drop table drag bar

* fix do not handle cell selection when the context menu shown

* Do not handle select cells when mouse up outside table
2019-10-13 13:23:00 +02:00
Ran Luo
5b8da2cdf4
Optimization of code block (#1445)
* duplicate css rule

* remove all codeLine

* Fix: #1446

* Fix #942 #1310

* Fix copy paste will add one more empty line in code block

* remove debug codes

* Fix update thematic break error

* fix: #1447

* Update octokit/rest and url-loader

* Fix: CI test error

* Fix comment issue1

* Fix: escape charachters in code block
2019-10-08 14:12:51 +08:00
Ran Luo
fab1c62fde Fix issue 1378 (#1405)
* Feat: add trimUnnecessaryEmptyLine setting option

* remove debug code

* Fix: tpro and remove debug codes

* rename trimUnnecessaryEmptyLine to trimUnnecessaryCodeBlockEmptyLines
2019-10-05 14:54:34 +02:00
Felix Häusler
ddf9c50a42
Complete TOML and JSON front matter (#1402)
* Complete TOML and JSON front matter

* Add frontmatter settings
2019-10-02 23:27:29 +02:00
Felix Häusler
067ec48547
fix: #1271 HTML paste handler (#1388) 2019-09-27 19:27:24 +02:00
Ran Luo
1eb79083fa
Fix: #1265 (#1373) 2019-09-26 23:47:11 +08:00
Ran Luo
6ab75845e8
Opti image (#1345)
* Feature: size image

* Support edit and delete image

* render img tag by image render component

* Fix: can not recognize pencent symbal in img src

* Feat: align image

* Feat: align image

* add tooltip of image toolbar

* Update html tag regexp

* Fix: wrong class name

* Feat: resize image

* Some bug fix

* Fix: image loading status

* Fix: backspace error in image selector

* Remove: unused codes

* Add download event

* Opti: image

* Opti: style of transformer

* fix: do not treat one image html block as html block

* Fix: parse src and title error

* remove debug codes
2019-09-18 19:01:50 +08:00
Ran Luo
46371f8c56
Update Babel to 7.x.x (#1253)
* update deps

* update babel

* add babel-runtime

* update config file

* update config file

* modify config

* modify some codes

* update some dependences

* Update allowed licenses validate
2019-09-01 03:30:01 +08:00
Ran Luo
af8593a4ce fix: #1226 (#1227) 2019-08-04 15:20:30 +02:00
Ran Luo
1811b689ba
Support copy&paste raw HTML (#1091)
* remove some unused ele when copy

* reserve ruby tag

* fix: #997
2019-07-26 11:28:47 +08:00
Felix Häusler
2686cfafe4 Update deps and automatically format style (#1168) 2019-07-24 10:57:21 +08:00
Ran Luo
179f3d3355
Optimization search (#1138)
* add search results

* replace icons in sidebar

* feat: click setting icon to open setting window

* remove some ununsed codes

* fix: #1120
2019-07-23 11:21:14 +08:00
Felix Häusler
72702427f1 Add ripgrep as find in files backend (#1086)
* Add ripgrep as find in files backend

* Fix API limit on Appveyor

* Fix css style

* support search and jump (#1)

* Style fixes
2019-06-20 22:46:24 +08:00
Ran Luo
d924b58623 fix: #752 (#1090) 2019-06-10 18:23:50 +02:00
Ran Luo
230c90c920
container block preview and inline syntax error (#992)
* opti: container block preview

* remove unused codes

* rewrite createBlock method

* remove ag-line classname

* just push codes

* hand enter + shift in paragraph

* update import markdown and export markdown

* update part updateCtrl

* update indent code block

* auto indent when press shift + enter

* update thematic break

* update inline syntax update reg

* update list and task list

* update atx heading and setext heading

* update paragraph

* update block quote

* adjust cursor in heading

* update codes

* paragraph turn into feature check

* check copy paste

* update turn into

* fix: delete last # error

* fix: turn setext heading to atx heading error

* fix: delete thematic break error

* paste and copy

* workarond turndown to support soft line break

* fix: unable create table

* modify export markdown

* modify test markdown

* fix: cursor error when update blockquote

* readd cursor check when dispatch changes

* fix: inline math create a lot extra char

* add code cache clear after each render

* fallback to prismjs2
2019-05-04 23:41:46 +08:00
Ran Luo
57cd04c50f
fix: commonmark example 475 and related failed examples (#957)
* fix: commonmark example 475 failed

* fix some strong and em commonmark examples failed test

* remove some debug code

* fix: cm example 353

* fix: cm example 387

* remove ununsed codes

* use \s to replace unicode whitespace array

* fix 3 atx heading examples

* fix setext heading failed examples and image alt examples

* fix: example 520 and 521
2019-04-19 07:51:33 +08:00
Ran Luo
f4f5ba3e00 add commonmark spec and gfm spec test and compare with markedjs (#943)
* add commonmark spec and gfm spec test and compare with markedjs

* ignore .env

* fix: load lang multiple times

* add eslint disable

* add `math`, `emoji`, `frontMatter` options to marked

* fix: commonmark example 223

* fix: import markdown error

* fix: commonmark example 7

* fix: commonmark example 40

* update test result

* update changelog

* update loose test regexp

* remove unused comments
2019-04-17 15:29:00 +02:00
Ran Luo
8b04b4c34a
Diagram (#914)
* add theme support of diagram

* add init mermaidTheme and vegaTheme when init muya

* export diagram

* update changelog

* add delete icon

* replace table toolbar icon to png

* replace icons in fromt menu and quick insert

* update format icons to png

* add theme support of diagram

* add init mermaidTheme and vegaTheme when init muya

* export diagram

* update changelog

* add delete icon

* replace table toolbar icon to png

* replace icons in fromt menu and quick insert

* update format icons to png

* update front icon hover color

* adjust format box icon size

* prevent some warning and rerender after change from source code

* remove debug code and replace image icon
2019-04-13 00:40:23 +08:00
Felix Häusler
1c4ec7cae4 add list indentation settings (#900) 2019-04-10 22:43:21 +08:00
Ran Luo
c0f333d9a2 fix: code highlight error when open file contains code block (#891)
* fix: code highlight error when open file contains code block

* some typo error

* some style change
2019-04-09 23:11:45 +02:00
Ran Luo
70d49c30e1
fix recognize -foo as list item (#832)
* style opti

* fix recognize `-foo` as list item

* update changelog

* update block.item regexp
2019-03-31 01:24:01 +08:00
Ran Luo
73a4abd7bb
fix #707 (#829)
* style opti

* fix #707

* update changelog

* fix: #831

* add checkSameMarkerOrDelimiter

* update selection color

* update some codes

* add a todo comment
2019-03-29 09:01:16 +08:00
Felix Häusler
270d33f6c8 fix: update list item lexer and parser (#803)
* fix: CommonMark 264

* fix: muya list behavior
2019-03-27 19:51:46 +08:00
Felix Häusler
7c5a6143b9 fix: broken relative image sources when exporting (#761) 2019-03-17 17:44:26 +08:00
Ran Luo
fd3daf4e51
fix: #752 (#758)
* fix: #752

* fix typo
2019-03-13 00:12:52 +08:00
Ran Luo
dec7502ebe Feat setextheading (#741)
* suport sutext heading input

* fix: #708

* fix: unrecognize horizontal line syntax
2019-03-09 14:13:42 +01:00
Felix Häusler
9a16361c1b Partial rebase from markedjs (#701)
* markedjs#1239, markedjs#1262: Escapedpipes

* markedjs#1303: add hard line break when backslash at EOL

* markedjs#1135: update the list of markdown escapes, per commonmark

* markedjs#1224: fix unsafe heading regex

* markedjs#1023: new blockquote rule: match any paragraph-like content up to next line

* markedjs#1245: GFM table compliance

* markedjs#1013, markedjs#1181 fix backticks in inline code and em

* markedjs#1351: fix emphasis closing by single _

* markedjs#1034: make autolinks compliant

* markedjs#1387: fix language identifier parsing

* Restore table escape characters
2019-03-04 20:26:21 +08:00
Ran Luo
55092ff15d
[WIP] Support Diagram (#529)
* feat: basic use of mermaid

* feat: add flowchart dep

* feat: handle flowchart render error

* feat: edit sequence diagram

* feat: support vega-lite

* fix: #534

* feat: basic use of mermaid

* feat: add flowchart dep

* feat: handle flowchart render error

* feat: edit sequence diagram

* feat: support vega-lite

* feat: copy paste and import and export of diagram

* finish

* fix: #537

* update: dependence
2018-11-01 22:42:34 +08:00
Jocs
ee8743dc66 opti: delete some ununsed codes 2018-10-26 00:31:57 +08:00
Jocs
d42edac8eb fix: #451 empty list item error 2018-10-25 22:00:51 +08:00
Ran Luo
39e1ea8081
Prism replace codemirror (#516)
* feat: basic use of code block by prism

* opti: remove codemirror from muya

* feat: add highlight to math and frontmatter

* feat: import and export in math block, html block, frontmatter, code block

* update: paragraph ctrl

* feat: copy and paste in new math block and html block

* feat: update code block style in dark theme

* feat: search and replace in code block

* fix: update menu item status when selection changed

* opti: optimization of updateCtrl divide it into clickCtrl and inputCtrl

* opti: search and replace in code block when no lang selected

* opti: copy paste in code block

* feat: insert paragraph before or after code block

* opti: change emoji.js to emoji.json

* feat: auto indent in code block

* opti: auto indent in code block

* opti: remove the use of snabbdom-virtualize

* fix: do not show format float box in code block

* opti: emoji picker

* update: delete some unused codes

* update: electron

* use a temp prismjs2 instead of prismjs
2018-10-23 21:21:58 +08:00
Jocs
0c770bb403 opti: remove unused dependence cheerio 2018-10-18 11:07:59 +08:00
Jocs
ecfcf32378 opti: rewrite markdown to state and remove lib parse5 2018-10-17 23:10:53 +08:00
Jocs
b68b30af4b opti: optimization some codes 2018-10-17 19:05:19 +08:00
jocs
6736b8d57f fix(#431): broken math expression 2018-09-27 21:03:39 +08:00
Jocs
78ec06c3cd fix: YAML frontmatter duplicates a new line on each opening of the file #494 2018-09-20 21:03:59 +08:00
Felix Häusler
7801c43f2e fix: #441 #451 empty list item has no paragraph (#456) 2018-08-12 19:54:16 +08:00
Ran Luo
405d04ce19
package and release muya (#413) 2018-07-07 00:10:30 +08:00