From 6e958530dea5db420d472ea7cfc787405cdf86a8 Mon Sep 17 00:00:00 2001 From: yzane Date: Fri, 4 May 2018 00:28:12 +0900 Subject: [PATCH 1/2] Add: Support markdown-it-plantuml #60 --- extension.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/extension.js b/extension.js index 372b48d..6ff9747 100644 --- a/extension.js +++ b/extension.js @@ -257,7 +257,11 @@ function convertMarkdownToHtml(filename, type, text) { } } }); - + + // PlantUML + // https://github.com/gmunguia/markdown-it-plantuml + md.use(require('markdown-it-plantuml')); + statusbarmessage.dispose(); return md.render(text); From 6e6fc317903f15c66b943e8e4af63a55bf617588 Mon Sep 17 00:00:00 2001 From: yzane Date: Fri, 4 May 2018 00:48:59 +0900 Subject: [PATCH 2/2] Update: release 1.2.0 --- CHANGELOG.md | 4 ++++ README.ja.md | 31 ++++++++++++++++++++++++++----- README.md | 28 ++++++++++++++++++++++++---- images/PlantUML.png | Bin 0 -> 4626 bytes package-lock.json | 7 ++++++- package.json | 3 ++- sample/README.html | 42 +++++++++++++++++++++++++++++++++++++++++- sample/README.jpeg | Bin 2040670 -> 2166893 bytes sample/README.pdf | Bin 495150 -> 505181 bytes sample/README.png | Bin 733693 -> 779833 bytes 10 files changed, 103 insertions(+), 12 deletions(-) create mode 100644 images/PlantUML.png diff --git a/CHANGELOG.md b/CHANGELOG.md index 825f884..db10385 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 1.2.0 (2018/05/03) +* Add: Support [markdown-it-plantuml](https://github.com/gmunguia/markdown-it-plantuml) + * Support for lightweight diagrams (PlantUML) [#60](https://github.com/yzane/vscode-markdown-pdf/issues/60) + ## 1.1.0 (2018/05/03) * Add: Support [markdown-it-container](https://github.com/markdown-it/markdown-it-container) [#72](https://github.com/yzane/vscode-markdown-pdf/issues/72) diff --git a/README.ja.md b/README.ja.md index 6d5605d..55070cc 100644 --- a/README.ja.md +++ b/README.ja.md @@ -31,6 +31,8 @@ * [emoji](http://www.webpagefx.com/tools/emoji-cheat-sheet/) * [markdown-it-checkbox](https://github.com/mcecot/markdown-it-checkbox) * [markdown-it-container](https://github.com/markdown-it/markdown-it-container) +* [PlantUML](http://plantuml.com/) + * [markdown-it-plantuml](https://github.com/gmunguia/markdown-it-plantuml) サンプルファイル * [pdf](sample/README.pdf) @@ -40,20 +42,34 @@ ### markdown-it-container -input +INPUT ``` ::: warning *here be dragons* ::: ``` -output +OUTPUT ``` html

here be dragons

``` +### markdown-it-plantuml + +INPUT +``` +@startuml +Bob -[#red]> Alice : hello +Alice -[#0000FF]->Bob : ok +@enduml +``` + +OUTPUT + +![PlantUML](images/PlantUML.png) + ## インストール @@ -508,6 +524,10 @@ Visual Studio Code の `files.autoGuessEncoding` オプションを使うと、 ## [Release Notes](CHANGELOG.md) +### 1.2.0 (2018/05/03) +* Add: Support [markdown-it-plantuml](https://github.com/gmunguia/markdown-it-plantuml) + * Support for lightweight diagrams (PlantUML) [#60](https://github.com/yzane/vscode-markdown-pdf/issues/60) + ### 1.1.0 (2018/05/03) * Add: Support [markdown-it-container](https://github.com/markdown-it/markdown-it-container) [#72](https://github.com/yzane/vscode-markdown-pdf/issues/72) @@ -532,17 +552,18 @@ MIT ## Special thanks -* [marcbachmann/node-html-pdf](https://github.com/marcbachmann/node-html-pdf) +* [GoogleChrome/puppeteer](https://github.com/GoogleChrome/puppeteer) * [markdown-it/markdown-it](https://github.com/markdown-it/markdown-it) * [mcecot/markdown-it-checkbox](https://github.com/mcecot/markdown-it-checkbox) +* [leff/markdown-it-named-headers](https://github.com/leff/markdown-it-named-headers) * [markdown-it/markdown-it-emoji](https://github.com/markdown-it/markdown-it-emoji) * [HenrikJoreteg/emoji-images](https://github.com/HenrikJoreteg/emoji-images) * [isagalaev/highlight.js](https://github.com/isagalaev/highlight.js) * [cheeriojs/cheerio](https://github.com/cheeriojs/cheerio) * [janl/mustache.js](https://github.com/janl/mustache.js) - +* [markdown-it/markdown-it-container](https://github.com/markdown-it/markdown-it-container) +* [gmunguia/markdown-it-plantuml](https://github.com/gmunguia/markdown-it-plantuml) and - * [cakebake/markdown-themeable-pdf](https://github.com/cakebake/markdown-themeable-pdf) diff --git a/README.md b/README.md index 20552f7..6f3bde2 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,8 @@ Supports the following features * [emoji](http://www.webpagefx.com/tools/emoji-cheat-sheet/) * [markdown-it-checkbox](https://github.com/mcecot/markdown-it-checkbox) * [markdown-it-container](https://github.com/markdown-it/markdown-it-container) +* [PlantUML](http://plantuml.com/) + * [markdown-it-plantuml](https://github.com/gmunguia/markdown-it-plantuml) Sample files * [pdf](sample/README.pdf) @@ -42,20 +44,34 @@ Sample files ### markdown-it-container -input +INPUT ``` ::: warning *here be dragons* ::: ``` -output +OUTPUT ``` html

here be dragons

``` +### markdown-it-plantuml + +INPUT +``` +@startuml +Bob -[#red]> Alice : hello +Alice -[#0000FF]->Bob : ok +@enduml +``` + +OUTPUT + +![PlantUML](images/PlantUML.png) + ## Install @@ -514,6 +530,10 @@ Please use the following to insert a page break. ## [Release Notes](CHANGELOG.md) +### 1.2.0 (2018/05/03) +* Add: Support [markdown-it-plantuml](https://github.com/gmunguia/markdown-it-plantuml) + * Support for lightweight diagrams (PlantUML) [#60](https://github.com/yzane/vscode-markdown-pdf/issues/60) + ### 1.1.0 (2018/05/03) * Add: Support [markdown-it-container](https://github.com/markdown-it/markdown-it-container) [#72](https://github.com/yzane/vscode-markdown-pdf/issues/72) @@ -547,10 +567,10 @@ MIT * [isagalaev/highlight.js](https://github.com/isagalaev/highlight.js) * [cheeriojs/cheerio](https://github.com/cheeriojs/cheerio) * [janl/mustache.js](https://github.com/janl/mustache.js) - +* [markdown-it/markdown-it-container](https://github.com/markdown-it/markdown-it-container) +* [gmunguia/markdown-it-plantuml](https://github.com/gmunguia/markdown-it-plantuml) and - * [marcbachmann/node-html-pdf](https://github.com/marcbachmann/node-html-pdf) * [cakebake/markdown-themeable-pdf](https://github.com/cakebake/markdown-themeable-pdf) diff --git a/images/PlantUML.png b/images/PlantUML.png new file mode 100644 index 0000000000000000000000000000000000000000..3dabf8f3721b549fc6b5f0a91c519806f7fd2681 GIT binary patch literal 4626 zcmZ`-XH-*L)24(HIt1yx1TH95zzb3hB@i$oAT0q25ET$mnqWWz(xfPn4${HU1wo2b z>C%gl-b5jEA&S&5_x0ZU<6YnT<2keTI8g$ZMdNktDa4Dw)ti=Hp?-y4DTdDDIeyUHrmp5wF`AG(R0bli`YV(}(m;_@_@r*au&F*@;jZ zMqMbMDk%n7GmoA5V13p{3!!*}kvpTvGD4>Bx|48~*+ zq^n%3?MkywXX{=PPy0AlDBE0n*U{JqO)n89$2d2Wu0leZG`bPqJzC3s^oRx{{kqcA zf{uwtt-=`7Jz2V7K?2SU^kne{IKfa4rMs*BkIG7uJ5f?H%?~GoV zbQARPZ1Piiq@sSGA0YU6uS@M7uZn^;i;@uX$@KJk$)%J%IiKsP3ZF^^sT=)v=68Z9 zR&r))(5>%WPP~dVD)0@~X&{Yhm*;&HjTWkXmbc~#rw^EfIGv&U6b7R;s9CS>aIkAP zYJlnP{SQ-LGanYcc6qrNBAy{$ngMRVG9>WeFjUc_j+&j9;|TGA7vu!X_eWXh4b3UH z*@!g?G5z3m&rgWF-?XKebc3X5X|Y(%q+_Mlp30JWXH(U4p44AnQ_e)8DA7eWZ4^?yc z(cOXmEY_d{l=iN=7Vd{~uzl3##_6Hj;Zcz8?F^8^j`l8!u2wTZkXcwO(;z{}G$|?R zvg-g(?L~R{;<2%@0m6Lf@7M*Qd&2b|uz?spvHuT5pE&t`tH|;>noD_9zUSP-C=5q? z+vGf(lw12N3}9kvOJ}UwKW&#y`{bouuuAtPq)SRl%vT{`AN_1-OW+3ybI^~s?{2CI zRheCyv9o<$*pN1@@Du7L>+9?1T9g?@P1Dsikuq6D=j;;h+@ps541SjxiVS3BW%FN%8=e$_06^$+pZ{~o=ekuw!crXxUl`G}09sy(DaugYci~S&;Jtj-l`CY5oWKua z4?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FEfThqh$m{lr{eLeqOV3@!-e7SnjpR*M)^or>Cdac9%X( zOit=+YHCgp2;T;*8LgMuurjF8~B#cE2RMy~pnd94ev@$oFg%}ooN(6Ejj|>hrHT&(V4n%Gr6?m+|3gfv@rsdvizPGZwX45TUdq$|h_Bjx zyio0#ttM&`zv!9U$$sZH0zC6>XRVl<&#ElIve``R%|JLK*MM1^q1Mi=fm z&fNrLP@Y3wXFQ?C1u;i^!F}HK`^4gN_=>h8Ew^K5StQO)ucl1eB3y3#@amIEeQDG$$G`EdQa$MQg` z*Z$X(m+ZfydPcRqm-n>SpKf~)Dp1Me_({$X&`D>mFAyr z13}&7u1$xqJ$H;@brkRk`my=5E>?KRr$!Q73OiUH{$V5vq-5#t0;!SKAEzY2<90N1;x#M9c)6T zSqhJTC&8UH)_!W>k`-^iI*fB0aZyoGaUKYhB-T%~&xl;yonGv_P zbA_%h1Qy8FZkkOt;je4DrXEQv0_|_~8_~H9=T}!(4+sJPg?V{cgLnZbxfo~+g_H9J zS?r~f#opE7n8?z-0&Vd8-TU{q)qVoMYPS2aV+zU~4f7pcWt<~!Fw>-vei(C;9d36qe9KLwGlrN|u zsF6(_hE)U+d->=yw&m~Bip~F{ht#5 eU-sg)gOFBTp0|Z|5o6>z4h2--3{s)zi2Xmut)pT9 literal 0 HcmV?d00001 diff --git a/package-lock.json b/package-lock.json index 1745bb4..7d51acc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "markdown-pdf", - "version": "1.1.0", + "version": "1.2.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1854,6 +1854,11 @@ "string": "3.3.3" } }, + "markdown-it-plantuml": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/markdown-it-plantuml/-/markdown-it-plantuml-1.0.0.tgz", + "integrity": "sha512-SA003T4/PVeNmxUV8mTE5If1hO7+1HPAPZlQGxETi12CU1xlmE0SgpBjVTM2oPDnoeKyCUuH7U1ra5QKKsFf2A==" + }, "mdurl": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", diff --git a/package.json b/package.json index c90d79d..50db0b7 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "markdown-pdf", "displayName": "Markdown PDF", "description": "Convert Markdown to PDF", - "version": "1.1.0", + "version": "1.2.0", "publisher": "yzane", "icon": "images/icon.png", "engines": { @@ -462,6 +462,7 @@ "markdown-it-container": "^2.0.0", "markdown-it-emoji": "^1.4.0", "markdown-it-named-headers": "0.0.4", + "markdown-it-plantuml": "^1.0.0", "mkdirp": "^0.5.1", "mustache": "^2.3.0", "puppeteer": "^1.3.0", diff --git a/sample/README.html b/sample/README.html index 8c9ce9e..ee8ada8 100644 --- a/sample/README.html +++ b/sample/README.html @@ -414,7 +414,13 @@

Features

Sample files

    @@ -423,6 +429,26 @@

    Features

  • png
  • jpeg
+

markdown-it-container

+

INPUT

+
::: warning +*here be dragons* +::: +
+

OUTPUT

+
<div class="warning"> +<p><em>here be dragons</em></p> +</div> +
+

markdown-it-plantuml

+

INPUT

+
@startuml +Bob -[#red]> Alice : hello +Alice -[#0000FF]->Bob : ok +@enduml +
+

OUTPUT

+

PlantUML

Install

Chromium download starts automatically when Markdown PDF is installed and Markdown file is first opened with Visutal Studio Code.

However, it is time-consuming depending on the environment because of its large size (~ 170Mb Mac, ~ 282Mb Linux, ~ 280Mb Win).

@@ -1031,6 +1057,18 @@

markdown-pdf.styles option

  • Online CSS (https://xxx/xxx.css) is applied correctly for JPG and PNG, but problems occur with PDF. #67
  • Release Notes

    +

    1.2.0 (2018/05/03)

    + +

    1.1.0 (2018/05/03)

    +

    1.0.5 (2018/05/03)

    and