Skip to content

Commit 5e62c25

Browse files
authored
feat: add a type param for plantuml's <uml> tag
* enable extra diagram types in plantuml like ebnf, chen, gantt, json, mindmap, regex, salt, wbs, yam… * bump version to 0.14.0
1 parent 84cc4e7 commit 5e62c25

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

extension.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"author": [
66
"[https://samwilson.id.au/ Sam Wilson]"
77
],
8-
"version": "0.13.1",
8+
"version": "0.14.0",
99
"url": "https://www.mediawiki.org/wiki/Extension:Diagrams",
1010
"descriptionmsg": "diagrams-desc",
1111
"license-name": "GPL-3.0-or-later",

includes/Diagrams.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ public function renderLocally( string $commandName, string $input, array $params
113113
$info = pathinfo( $tmpGraphSourceFile->getPath() );
114114
$outputPath = $info['dirname'] . '/' . $info['filename'] . '.' . $outputFormat;
115115
$tmpOutFiles[$outputType] = new TempFSFile( $outputPath );
116-
$input = "@startuml\n$input\n@enduml";
116+
$type = $params['type'] ?? 'uml';
117+
$input = "@start$type\n$input\n@end$type";
117118
$cmdArgs = [ "-t$outputFormat", '-output', dirname( $tmpOutFiles[$outputType]->getPath() ) ];
118119
} else {
119120
$tmpOutFiles[$outputType] = $tmpFactory->newTempFSFile( 'diagrams_out_', $outputFormat );

0 commit comments

Comments
 (0)