Skip to content

feat: Added support for PlantUML using Confluence PlantUML macro#729

Open
artur-kacen wants to merge 1 commit intokovetskiy:masterfrom
artur-kacen:feature/add-plant-uml-support
Open

feat: Added support for PlantUML using Confluence PlantUML macro#729
artur-kacen wants to merge 1 commit intokovetskiy:masterfrom
artur-kacen:feature/add-plant-uml-support

Conversation

@artur-kacen
Copy link

Added support of PlantUML based diagrams using Confluence PlantUML macro.

All rendering will be done by Confluence if PlantUML plugin is installed.

@artur-kacen
Copy link
Author

Hi @kovetskiy , can you re-run unit tests? Locally failing test is working fine

$ make test
go test -race -coverprofile=profile.cov ./... -v
=== RUN   Test_setLogLevel
=== RUN   Test_setLogLevel/warning
=== RUN   Test_setLogLevel/error
=== RUN   Test_setLogLevel/fatal
=== RUN   Test_setLogLevel/invalid
=== RUN   Test_setLogLevel/empty
=== RUN   Test_setLogLevel/info
=== RUN   Test_setLogLevel/debug
=== RUN   Test_setLogLevel/trace
--- PASS: Test_setLogLevel (0.00s)
    --- PASS: Test_setLogLevel/warning (0.00s)
    --- PASS: Test_setLogLevel/error (0.00s)
    --- PASS: Test_setLogLevel/fatal (0.00s)
    --- PASS: Test_setLogLevel/invalid (0.00s)
    --- PASS: Test_setLogLevel/empty (0.00s)
    --- PASS: Test_setLogLevel/info (0.00s)
    --- PASS: Test_setLogLevel/debug (0.00s)
    --- PASS: Test_setLogLevel/trace (0.00s)
PASS
coverage: 0.0% of statements
ok      github.com/kovetskiy/mark       (cached)        coverage: 0.0% of statements
=== RUN   TestPrepareAttachmentsWithWorkDirBase
    attachment_test.go:48: attaches: <nil>
--- PASS: TestPrepareAttachmentsWithWorkDirBase (0.00s)
=== RUN   TestPrepareAttachmentsWithSubDirBase
--- PASS: TestPrepareAttachmentsWithSubDirBase (0.00s)
PASS
coverage: 13.3% of statements
ok      github.com/kovetskiy/mark/attachment    (cached)        coverage: 13.3% of statements
        github.com/kovetskiy/mark/confluence            coverage: 0.0% of statements
=== RUN   TestExtractD2Image
=== RUN   TestExtractD2Image/example
--- PASS: TestExtractD2Image (3.03s)
    --- PASS: TestExtractD2Image/example (3.03s)
PASS
coverage: 81.6% of statements
ok      github.com/kovetskiy/mark/d2    (cached)        coverage: 81.6% of statements
        github.com/kovetskiy/mark/includes              coverage: 0.0% of statements
        github.com/kovetskiy/mark/macro         coverage: 0.0% of statements
=== RUN   TestCompileMarkdown
Testing: testdata/admonitions.md
Testing: testdata/codes.md
Testing: testdata/header.md
Testing: testdata/issue-64-broken-link.md
Testing: testdata/links.md
Testing: testdata/lists.md
Testing: testdata/macro-include.md
Testing: testdata/mention.md
Testing: testdata/newlines.md
Testing: testdata/pagelayout.md
Testing: testdata/quotes.md
Testing: testdata/table.md
Testing: testdata/tags.md
--- PASS: TestCompileMarkdown (0.10s)
=== RUN   TestCompileMarkdownDropH1
--- PASS: TestCompileMarkdownDropH1 (0.07s)
=== RUN   TestCompileMarkdownStripNewlines
--- PASS: TestCompileMarkdownStripNewlines (0.06s)
=== RUN   TestContinueOnError
2026-02-21 11:49:47.498 INFO  processing testdata/batch-tests/bad-test.md
2026-02-21 11:49:47.499 ERROR specified file doesn't contain metadata and URL is not specified via command line or doesn't contain pageId GET-parameter
2026-02-21 11:49:47.499 INFO  processing testdata/batch-tests/errord-test.md
2026-02-21 11:49:47.500 ERROR specified file doesn't contain metadata and URL is not specified via command line or doesn't contain pageId GET-parameter
2026-02-21 11:49:47.500 INFO  processing testdata/batch-tests/good-test.md
<h2 id="Foo">Foo</h2>
<blockquote>
<p><strong>TL;DR:</strong> Thingy!
More stuff</p>
</blockquote>
<p>Foo</p>

2026-02-21 11:49:47.507 INFO  processing testdata/batch-tests/invalid-test.md
2026-02-21 11:49:47.509 ERROR specified file doesn't contain metadata and URL is not specified via command line or doesn't contain pageId GET-parameter
2026-02-21 11:49:47.509 INFO  processing testdata/batch-tests/valid-test.md
<h1 id="a">a</h1>
<h2 id="b">b</h2>
<h3 id="c">c</h3>
<h4 id="d">d</h4>
<h5 id="e">e</h5>
<h1 id="f">f</h1>
<h2 id="g">g</h2>
<h1 id="This/is-some_Heading.yml">This/is some_Heading.yml</h1>

--- PASS: TestContinueOnError (0.04s)
PASS
coverage: 95.2% of statements
ok      github.com/kovetskiy/mark/markdown      (cached)        coverage: 95.2% of statements
=== RUN   TestExtractMermaidImage
=== RUN   TestExtractMermaidImage/example
--- PASS: TestExtractMermaidImage (2.21s)
    --- PASS: TestExtractMermaidImage/example (2.21s)
PASS
coverage: 81.0% of statements
ok      github.com/kovetskiy/mark/mermaid       (cached)        coverage: 81.0% of statements
=== RUN   TestExtractDocumentLeadingH1
--- PASS: TestExtractDocumentLeadingH1 (0.00s)
=== RUN   TestSetTitleFromFilename
=== RUN   TestSetTitleFromFilename/set_title_from_filename
=== RUN   TestSetTitleFromFilename/replace_underscores_with_spaces
=== RUN   TestSetTitleFromFilename/replace_dashes_with_spaces
=== RUN   TestSetTitleFromFilename/mixed_underscores_and_dashes
=== RUN   TestSetTitleFromFilename/already_title_cased
--- PASS: TestSetTitleFromFilename (0.00s)
    --- PASS: TestSetTitleFromFilename/set_title_from_filename (0.00s)
    --- PASS: TestSetTitleFromFilename/replace_underscores_with_spaces (0.00s)
    --- PASS: TestSetTitleFromFilename/replace_dashes_with_spaces (0.00s)
    --- PASS: TestSetTitleFromFilename/mixed_underscores_and_dashes (0.00s)
    --- PASS: TestSetTitleFromFilename/already_title_cased (0.00s)
PASS
coverage: 12.3% of statements
ok      github.com/kovetskiy/mark/metadata      (cached)        coverage: 12.3% of statements
=== RUN   TestParseLinks
--- PASS: TestParseLinks (0.00s)
=== RUN   TestEncodeTinyLinkID
=== RUN   TestEncodeTinyLinkID/small_page_ID
=== RUN   TestEncodeTinyLinkID/another_small_page_ID
=== RUN   TestEncodeTinyLinkID/large_page_ID_(Confluence_Cloud)
=== RUN   TestEncodeTinyLinkID/page_ID_1
=== RUN   TestEncodeTinyLinkID/page_ID_255
=== RUN   TestEncodeTinyLinkID/page_ID_256
--- PASS: TestEncodeTinyLinkID (0.00s)
    --- PASS: TestEncodeTinyLinkID/small_page_ID (0.00s)
    --- PASS: TestEncodeTinyLinkID/another_small_page_ID (0.00s)
    --- PASS: TestEncodeTinyLinkID/large_page_ID_(Confluence_Cloud) (0.00s)
    --- PASS: TestEncodeTinyLinkID/page_ID_1 (0.00s)
    --- PASS: TestEncodeTinyLinkID/page_ID_255 (0.00s)
    --- PASS: TestEncodeTinyLinkID/page_ID_256 (0.00s)
=== RUN   TestGenerateTinyLink
=== RUN   TestGenerateTinyLink/cloud_URL_with_trailing_slash
=== RUN   TestGenerateTinyLink/cloud_URL_without_trailing_slash
=== RUN   TestGenerateTinyLink/server_URL
=== RUN   TestGenerateTinyLink/invalid_page_ID
--- PASS: TestGenerateTinyLink (0.00s)
    --- PASS: TestGenerateTinyLink/cloud_URL_with_trailing_slash (0.00s)
    --- PASS: TestGenerateTinyLink/cloud_URL_without_trailing_slash (0.00s)
    --- PASS: TestGenerateTinyLink/server_URL (0.00s)
    --- PASS: TestGenerateTinyLink/invalid_page_ID (0.00s)
=== RUN   TestEncodeTinyLinkIDMatchesPerl
--- PASS: TestEncodeTinyLinkIDMatchesPerl (0.00s)
=== RUN   TestEncodeTinyLinkIDLargeIDs
--- PASS: TestEncodeTinyLinkIDLargeIDs (0.00s)
PASS
coverage: 12.1% of statements
ok      github.com/kovetskiy/mark/page  (cached)        coverage: 12.1% of statements
        github.com/kovetskiy/mark/parser                coverage: 0.0% of statements
        github.com/kovetskiy/mark/renderer              coverage: 0.0% of statements
        github.com/kovetskiy/mark/stdlib                coverage: 0.0% of statements
?       github.com/kovetskiy/mark/types [no test files]
=== RUN   TestCheckMutuallyExclusiveTitleFlags
=== RUN   TestCheckMutuallyExclusiveTitleFlags/neither_flag_set
=== RUN   TestCheckMutuallyExclusiveTitleFlags/only_title-from-h1_set
=== RUN   TestCheckMutuallyExclusiveTitleFlags/only_title-from-filename_set
=== RUN   TestCheckMutuallyExclusiveTitleFlags/both_flags_set
--- PASS: TestCheckMutuallyExclusiveTitleFlags (0.00s)
    --- PASS: TestCheckMutuallyExclusiveTitleFlags/neither_flag_set (0.00s)
    --- PASS: TestCheckMutuallyExclusiveTitleFlags/only_title-from-h1_set (0.00s)
    --- PASS: TestCheckMutuallyExclusiveTitleFlags/only_title-from-filename_set (0.00s)
    --- PASS: TestCheckMutuallyExclusiveTitleFlags/both_flags_set (0.00s)
PASS
coverage: 2.3% of statements
ok      github.com/kovetskiy/mark/util  (cached)        coverage: 2.3% of statements
        github.com/kovetskiy/mark/vfs           coverage: 0.0% of statements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant