Open Antonytm opened 5 months ago
Steps to reproduce:
npm install --global tplant
Expected result: SVG should be generated Actual result:
This page contains the following errors:
error on line 634 at column 19: XML declaration allowed only at the start of the document
Below is a rendering of the page up to the first error.
[From string (line 3) ]
@startuml
+findConfigUpwards(rootDir: string): string | null
Syntax Error?
I also have this problem with another project. It is due to a bug (that I fixed in a PR https://github.com/bafolts/tplant/pull/121#issue-2139103949) where tplant puts functions (which are not UML methods) into the PlantUML (and they appear outside of classes, thus causing PlantUML to crash).
For example, https://github.com/babel/babel/blob/0417c41e5982b8e49477227dc8fc20f16eb61e4c/packages/babel-core/src/config/files/configuration.ts#L212 shows that it's not a method (export function).
I suspect the npm package didn't get built/published properly. I also noticed that tplant -V
says 3.1.2, whereas it should have been bumped to 3.1.3 according to the npm package.
I just cloned and built the code from the repo here, and I don't have the problem with functions going into the PlantUML. However, if I run it from the latest npm install tplant
, I see the functions there.
It works for me if I install the 3.1.2 3.1.0 version:
npm install -g tplant@3.1.0
I get
when trying to generate documentation for @sitecore/jss
I assume it might be related to
in tsconfig.json