Skip to content

Commit

Permalink
Add: markdown-pdf.plantumlServer option #139
Browse files Browse the repository at this point in the history
  • Loading branch information
yzane committed Mar 17, 2020
1 parent 4a6b106 commit 42ecf2b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
7 changes: 6 additions & 1 deletion README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,9 @@ Markdown PDF をインストールして、Visual Studio Code で Markdownファ
||[markdown-pdf.omitBackground](#markdown-pdfomitbackground)| |
|[PlantUML options](#plantuml-options)|[markdown-pdf.plantumlOpenMarker](#markdown-pdfplantumlopenmarker)| |
||[markdown-pdf.plantumlCloseMarker](#markdown-pdfplantumlclosemarker)| |
||[markdown-pdf.plantumlServer](#markdown-pdfplantumlserver)| |
|[markdown-it-include options](#markdown-it-include-options)|[markdown-pdf.markdown-it-include.enable](#markdown-pdfmarkdown-it-includeenable)| |
|[mermaid options](#mermaid-options)|[markdown-pdf.mermaidServer](#markdown-pdfmermaidserver)||
|[mermaid options](#mermaid-options)|[markdown-pdf.mermaidServer](#markdown-pdfmermaidserver)| |

### Save options

Expand Down Expand Up @@ -504,6 +505,10 @@ Markdown PDF をインストールして、Visual Studio Code で Markdownファ
- plantuml パーサーの終了区切り文字
- Default: @enduml

#### `markdown-pdf.plantumlServer`
- Plantuml server. e.g. http://localhost:8080
- Default: http://www.plantuml.com/plantuml

### markdown-it-include options

#### `markdown-pdf.markdown-it-include.enable`
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,9 @@ If the download is not successful or you want to avoid downloading every time yo
||[markdown-pdf.omitBackground](#markdown-pdfomitbackground)| |
|[PlantUML options](#plantuml-options)|[markdown-pdf.plantumlOpenMarker](#markdown-pdfplantumlopenmarker)| |
||[markdown-pdf.plantumlCloseMarker](#markdown-pdfplantumlclosemarker)| |
||[markdown-pdf.plantumlServer](#markdown-pdfplantumlserver)| |
|[markdown-it-include options](#markdown-it-include-options)|[markdown-pdf.markdown-it-include.enable](#markdown-pdfmarkdown-it-includeenable)| |
|[mermaid options](#mermaid-options)|[markdown-pdf.mermaidServer](#markdown-pdfmermaidserver)||
|[mermaid options](#mermaid-options)|[markdown-pdf.mermaidServer](#markdown-pdfmermaidserver)| |

### Save options

Expand Down Expand Up @@ -510,6 +511,10 @@ If the download is not successful or you want to avoid downloading every time yo
- Closing delimiter used for the plantuml parser.
- Default: @enduml

#### `markdown-pdf.plantumlServer`
- Plantuml server. e.g. http://localhost:8080
- Default: http://www.plantuml.com/plantuml

### markdown-it-include options

#### `markdown-pdf.markdown-it-include.enable`
Expand Down
3 changes: 2 additions & 1 deletion extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,8 @@ function convertMarkdownToHtml(filename, type, text) {
// https://github.com/gmunguia/markdown-it-plantuml
var plantumlOptions = {
openMarker: matterParts.data.plantumlOpenMarker || vscode.workspace.getConfiguration('markdown-pdf')['plantumlOpenMarker'] || '@startuml',
closeMarker: matterParts.data.plantumlCloseMarker || vscode.workspace.getConfiguration('markdown-pdf')['plantumlCloseMarker'] || '@enduml'
closeMarker: matterParts.data.plantumlCloseMarker || vscode.workspace.getConfiguration('markdown-pdf')['plantumlCloseMarker'] || '@enduml',
server: vscode.workspace.getConfiguration('markdown-pdf')['plantumlServer'] || ''
}
md.use(require('markdown-it-plantuml'), plantumlOptions);

Expand Down
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,11 @@
"default": "@enduml",
"description": "Closing delimiter used for the plantuml parser."
},
"markdown-pdf.plantumlServer": {
"type": "string",
"default": "http://www.plantuml.com/plantuml",
"description": "plantuml server"
},
"markdown-pdf.StatusbarMessageTimeout": {
"type": "number",
"default": 10000,
Expand Down

0 comments on commit 42ecf2b

Please sign in to comment.