confluence-cli 1.35.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -0
- package/lib/macro-converter.js +4 -3
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -770,6 +770,55 @@ echo "# Hello" | confluence convert --input-format markdown --output-format stor
|
|
|
770
770
|
confluence convert -i page.xml -o page.md --input-format storage --output-format markdown
|
|
771
771
|
```
|
|
772
772
|
|
|
773
|
+
## Markdown Marker Conventions
|
|
774
|
+
|
|
775
|
+
When converting markdown to Confluence storage format (via `confluence convert`, `create`, or `update`), the following paragraph-level markers produce native Confluence macros. Each marker round-trips back to its markdown form when going storage → markdown.
|
|
776
|
+
|
|
777
|
+
### Callout macros — `INFO`, `WARNING`, `NOTE`
|
|
778
|
+
|
|
779
|
+
A blockquote whose first line is `**INFO**`, `**WARNING**`, or `**NOTE**` becomes the corresponding Confluence macro:
|
|
780
|
+
|
|
781
|
+
```markdown
|
|
782
|
+
> **INFO**
|
|
783
|
+
> Heads up — this is an info box.
|
|
784
|
+
|
|
785
|
+
> **WARNING**
|
|
786
|
+
> Watch out for this.
|
|
787
|
+
|
|
788
|
+
> **NOTE**
|
|
789
|
+
> Side note for the reader.
|
|
790
|
+
```
|
|
791
|
+
|
|
792
|
+
The reverse direction emits the equivalent shorthand (`[!info]` / `[!warning]` / `[!note]` followed by the body), which markdown→storage then re-expands.
|
|
793
|
+
|
|
794
|
+
A blockquote without one of these markers stays a **plain blockquote** (`<blockquote>…</blockquote>`) — `> …` is treated as a quotation, not an alert. Use the markers above when you want a callout.
|
|
795
|
+
|
|
796
|
+
### `**TOC**` — Table of Contents
|
|
797
|
+
|
|
798
|
+
A paragraph containing only `**TOC**` becomes a Confluence Table of Contents macro using the macro's default heading levels:
|
|
799
|
+
|
|
800
|
+
```markdown
|
|
801
|
+
**TOC**
|
|
802
|
+
```
|
|
803
|
+
|
|
804
|
+
### `**ANCHOR: id**` — anchor
|
|
805
|
+
|
|
806
|
+
A paragraph containing only `**ANCHOR: my-section**` becomes a Confluence anchor macro with the given id:
|
|
807
|
+
|
|
808
|
+
```markdown
|
|
809
|
+
**ANCHOR: my-section**
|
|
810
|
+
```
|
|
811
|
+
|
|
812
|
+
### `[text](#id)` — same-page anchor link
|
|
813
|
+
|
|
814
|
+
A standard markdown link whose href starts with `#` becomes an `ac:link` with `ac:anchor`, rendering as an in-page jump in Confluence:
|
|
815
|
+
|
|
816
|
+
```markdown
|
|
817
|
+
See [the anchor](#my-section) above.
|
|
818
|
+
```
|
|
819
|
+
|
|
820
|
+
This works under all three `linkStyle` modes (`smart`, `wiki`, `plain`) — the anchor-link conversion runs before the general `<a href>` handling.
|
|
821
|
+
|
|
773
822
|
## Development
|
|
774
823
|
|
|
775
824
|
```bash
|
package/lib/macro-converter.js
CHANGED
|
@@ -105,9 +105,10 @@ class MacroConverter {
|
|
|
105
105
|
<ac:rich-text-body>${cleanContent}</ac:rich-text-body>
|
|
106
106
|
</ac:structured-macro>`;
|
|
107
107
|
} else {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
108
|
+
// Plain blockquote — `> …` is a quotation, not an alert. Use the
|
|
109
|
+
// `> **INFO**` / `> **WARNING**` / `> **NOTE**` markers above to
|
|
110
|
+
// produce a Confluence info / warning / note macro instead.
|
|
111
|
+
return `<blockquote>${content}</blockquote>`;
|
|
111
112
|
}
|
|
112
113
|
});
|
|
113
114
|
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "confluence-cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "confluence-cli",
|
|
9
|
-
"version": "
|
|
9
|
+
"version": "2.0.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"axios": "^1.15.0",
|