Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: kovetskiy/mark
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9.1.0
Choose a base ref
...
head repository: kovetskiy/mark
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Apr 3, 2023

  1. .github: Fix release workflow

    mrueg committed Apr 3, 2023
    Copy the full SHA
    768b470 View commit details
  2. Bump version to 9.1.1

    mrueg committed Apr 3, 2023
    Copy the full SHA
    20afbc5 View commit details
  3. .github: Fix tag

    mrueg committed Apr 3, 2023
    Copy the full SHA
    f75924b View commit details
  4. Bump version to 9.1.2

    mrueg committed Apr 3, 2023
    Copy the full SHA
    c6d01eb View commit details
  5. .github: Fix goreleaser build

    mrueg committed Apr 3, 2023
    Copy the full SHA
    2e52ae8 View commit details
  6. Bump version to 9.1.3

    mrueg committed Apr 3, 2023
    Copy the full SHA
    1c1f82a View commit details
  7. .github: Quote go version

    mrueg committed Apr 3, 2023
    Copy the full SHA
    2773e15 View commit details
  8. Bump version to 9.1.4

    mrueg committed Apr 3, 2023
    Copy the full SHA
    d1f69bc View commit details

Commits on Apr 20, 2023

  1. Simplify config handling

    * Switch to urfave/cli/v2
    * Add more environment variables
    mrueg committed Apr 20, 2023
    Copy the full SHA
    262853f View commit details
  2. Copy the full SHA
    2f44bcb View commit details

Commits on Apr 25, 2023

  1. Copy the full SHA
    4c3d417 View commit details
  2. Add issue templates

    mrueg committed Apr 25, 2023
    Copy the full SHA
    88c070f View commit details
  3. Add support for mermaid via library

    Implementation is largely based on: #167
    
    Co-Authored-By: Manuel Rueger <manuel@rueg.eu>
    dreampuf and mrueg committed Apr 25, 2023
    Copy the full SHA
    d9d560e View commit details

Commits on Apr 26, 2023

  1. Bump version to 9.2.0

    mrueg committed Apr 26, 2023
    Copy the full SHA
    abd0c8b View commit details
  2. Copy the full SHA
    73f2693 View commit details
  3. Bump version to 9.2.1

    mrueg committed Apr 26, 2023
    Copy the full SHA
    51accf0 View commit details

Commits on May 3, 2023

  1. Add debug output for config

    mrueg committed May 3, 2023
    Copy the full SHA
    2b756da View commit details
  2. Support inline images

    mrueg committed May 3, 2023
    Copy the full SHA
    fd97ee7 View commit details
  3. Bump version to 9.3.0

    mrueg committed May 3, 2023
    Copy the full SHA
    72cfc04 View commit details
  4. Copy the full SHA
    af221d5 View commit details
  5. Fix mermaid-go rendering

    mrueg committed May 3, 2023
    Copy the full SHA
    13c5949 View commit details
  6. Bump version to 9.3.1

    mrueg committed May 3, 2023
    Copy the full SHA
    21d0a7d View commit details

Commits on May 5, 2023

  1. Support customizable layouts

    mrueg committed May 5, 2023
    Copy the full SHA
    622be6e View commit details
  2. Copy the full SHA
    eba2396 View commit details
  3. Copy the full SHA
    2aa1606 View commit details
  4. Bump version to 9.4.0

    mrueg committed May 5, 2023
    Copy the full SHA
    3271218 View commit details

Commits on May 10, 2023

  1. Update README.md

    joyfulrabbit authored and mrueg committed May 10, 2023
    Copy the full SHA
    ae5163d View commit details
  2. Update README.md

    Co-authored-by: Manuel Rüger <manuel@rueg.eu>
    joyfulrabbit and mrueg committed May 10, 2023
    Copy the full SHA
    f0bb706 View commit details

Commits on May 12, 2023

  1. Update README.md

    tiny changes, big impact
    joyfulrabbit authored and mrueg committed May 12, 2023
    Copy the full SHA
    679eb7f View commit details
  2. Update README.md

    updated per mrueg suggestions
    joyfulrabbit authored and mrueg committed May 12, 2023
    Copy the full SHA
    5602297 View commit details

Commits on May 22, 2023

  1. Move drop-h1 to the renderer

    This is more reliable than a regular expression.
    mrueg committed May 22, 2023
    Copy the full SHA
    484f988 View commit details

Commits on May 23, 2023

  1. Add expand macro

    mrueg committed May 23, 2023
    Copy the full SHA
    0828171 View commit details
  2. Fallback to old user search

    mrueg committed May 23, 2023
    Copy the full SHA
    d67cc63 View commit details
  3. Add user profile macro

    mrueg committed May 23, 2023
    Copy the full SHA
    6a63913 View commit details
  4. Bump dependencies

    mrueg committed May 23, 2023
    Copy the full SHA
    cb5e4aa View commit details
  5. Version bump to 9.5.0

    mrueg committed May 23, 2023
    Copy the full SHA
    6d8d70a View commit details
  6. Drop newlines within macros

    Newlines will cause trouble when rendering and the macro is used inside
    a table.
    mrueg committed May 23, 2023
    Copy the full SHA
    9a37fc4 View commit details
  7. Bump version to 9.5.1

    mrueg committed May 23, 2023
    Copy the full SHA
    dbadf47 View commit details
  8. Copy the full SHA
    0b6dd09 View commit details
  9. Bump version to 9.5.2

    mrueg committed May 23, 2023
    Copy the full SHA
    dbb5237 View commit details

Commits on May 25, 2023

  1. Add contentbylabel macro

    mrueg committed May 25, 2023
    Copy the full SHA
    3307f32 View commit details
  2. Copy the full SHA
    28ee195 View commit details
  3. Add Page properties macro

    mrueg committed May 25, 2023
    Copy the full SHA
    0988a7a View commit details
  4. Add Jira Filter View Macro

    zackerydev authored and mrueg committed May 25, 2023
    Copy the full SHA
    80d3be2 View commit details

Commits on May 26, 2023

  1. Update mermaid to v10.2.0

    mrueg committed May 26, 2023
    Copy the full SHA
    278488e View commit details

Commits on Jun 8, 2023

  1. Fix user mentioning

    mrueg committed Jun 8, 2023
    Copy the full SHA
    22bf460 View commit details
  2. page-tree

    joyfulrabbit authored and mrueg committed Jun 8, 2023
    Copy the full SHA
    063b6e7 View commit details
  3. readme

    joyfulrabbit authored and mrueg committed Jun 8, 2023
    Copy the full SHA
    d8109c6 View commit details
  4. readme

    joyfulrabbit authored and mrueg committed Jun 8, 2023
    Copy the full SHA
    e41572c View commit details
  5. Update pkg/mark/stdlib/stdlib.go

    Co-authored-by: Manuel Rüger <manuel@rueg.eu>
    joyfulrabbit and mrueg committed Jun 8, 2023
    Copy the full SHA
    383e4ae View commit details
Showing with 4,543 additions and 2,006 deletions.
  1. +43 −0 .github/ISSUE_TEMPLATE/bug_report.md
  2. +1 −0 .github/ISSUE_TEMPLATE/config.yml
  3. +20 −0 .github/ISSUE_TEMPLATE/feature_request.md
  4. +14 −0 .github/dependabot.yml
  5. +37 −24 .github/workflows/ci.yml
  6. +6 −6 .github/workflows/goreleaser.yml
  7. +1 −1 .gitignore
  8. +12 −8 .goreleaser.yml
  9. +12 −0 .markdownlint-cli2.jsonc
  10. +10 −3 Dockerfile
  11. +195 −16 LICENSE
  12. +418 −210 README.md
  13. +294 −0 attachment/attachment.go
  14. +90 −0 attachment/attachment_test.go
  15. +16 −30 auth.go
  16. +0 −29 config.go
  17. +133 −56 {pkg → }/confluence/api.go
  18. +1 −1 docker-compose.yaml
  19. +26 −15 go.mod
  20. +61 −42 go.sum
  21. +13 −7 {pkg/mark → }/includes/templates.go
  22. +3 −2 {pkg/mark → }/macro/macro.go
  23. +422 −134 main.go
  24. +45 −0 main_test.go
  25. +108 −0 markdown/markdown.go
  26. +124 −0 markdown/markdown_test.go
  27. +55 −0 mermaid/mermaid.go
  28. +49 −0 mermaid/mermaid_test.go
  29. +43 −19 pkg/mark/meta.go → metadata/metadata.go
  30. +30 −0 metadata/metadata_test.go
  31. +2 −2 {pkg/mark → page}/ancestry.go
  32. +21 −10 {pkg/mark → page}/link.go
  33. +4 −2 {pkg/mark → page}/link_test.go
  34. +4 −3 pkg/mark/mark.go → page/page.go
  35. +56 −0 parser/confluenceids.go
  36. +5 −3 {pkg/mark → }/parser/confluencetags.go
  37. +0 −259 pkg/mark/attachment.go
  38. +0 −56 pkg/mark/attachment_test.go
  39. +0 −496 pkg/mark/markdown.go
  40. +0 −55 pkg/mark/markdown_test.go
  41. +0 −319 pkg/mark/stdlib/stdlib.go
  42. +0 −88 pkg/mark/testdata/codes.html
  43. +0 −14 pkg/mark/testdata/links.md
  44. +0 −6 pkg/mark/testdata/macro-include.html
  45. +0 −7 pkg/mark/testdata/macro-include.md
  46. +0 −31 pkg/mark/testdata/quotes.html
  47. +0 −29 pkg/mark/testdata/quotes.md
  48. +0 −14 pkg/mark/testdata/table.html
  49. +0 −3 pkg/mark/testdata/table.md
  50. +0 −6 pkg/mark/testdata/tags.html
  51. +221 −0 renderer/blockquote.go
  52. +77 −0 renderer/codeblock.go
  53. +189 −0 renderer/fencedcodeblock.go
  54. +57 −0 renderer/heading.go
  55. +110 −0 renderer/htmlblock.go
  56. +118 −0 renderer/image.go
  57. +92 −0 renderer/link.go
  58. +44 −0 renderer/paragraph.go
  59. +136 −0 renderer/text.go
  60. +467 −0 stdlib/stdlib.go
  61. +19 −0 testdata/codes-stripnewlines.html
  62. +20 −0 testdata/codes.html
  63. 0 {pkg/mark → }/testdata/codes.md
  64. +7 −0 testdata/header-droph1.html
  65. +1 −0 {pkg/mark → }/testdata/header.html
  66. +2 −0 {pkg/mark → }/testdata/header.md
  67. 0 {pkg/mark → }/testdata/issue-64-broken-link.html
  68. 0 {pkg/mark → }/testdata/issue-64-broken-link.md
  69. +6 −0 {pkg/mark → }/testdata/links.html
  70. +26 −0 testdata/links.md
  71. 0 {pkg/mark → }/testdata/lists.html
  72. 0 {pkg/mark → }/testdata/lists.md
  73. +18 −0 testdata/macro-include-stripnewlines.html
  74. +26 −0 testdata/macro-include.html
  75. +18 −0 testdata/macro-include.md
  76. +8 −0 testdata/newlines-stripnewlines.html
  77. 0 {pkg/mark → }/testdata/newlines.html
  78. 0 {pkg/mark → }/testdata/newlines.md
  79. +18 −0 testdata/pagelayout.html
  80. +21 −0 testdata/pagelayout.md
  81. +104 −0 testdata/quotes-droph1.html
  82. +101 −0 testdata/quotes-stripnewlines.html
  83. +105 −0 testdata/quotes.html
  84. +95 −0 testdata/quotes.md
  85. +28 −0 testdata/table.html
  86. +7 −0 testdata/table.md
  87. +6 −0 testdata/tags.html
  88. +3 −0 {pkg/mark → }/testdata/tags.md
  89. BIN testdata/test.png
  90. +19 −0 vfs/vfs.go
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: Report a bug
about: Create a bug report to help us improve mark
title: ''
labels: bug
assignees: ''

---

## What happened?

A clear and concise description of what the bug is.

## What did you expect to happen?

A clear and concise description of what you expected to happen.

## How can we reproduce the behavior you experienced?

Steps to reproduce the behavior:

1. Step 1
2. Step 2
3. Step 3
4. Step 4

In case this is related to specific markdown, please provide a minimal markdown example here.

## Further Information (please complete the following information)

* Mark Version (`mark --version`): [e.g. v9.1.4]
* Mark Parameters: [e.g. `--drop-h1 --title-from-h1`]
* Confluence Hosting: [e.g. Cloud, Server or Datacenter]
* Confluence Version: [e.g. v7.13]
* Environment specific Information: [e.g. running in Github Actions, or on Mac OS X, etc.]

## Logs or other output

Please provide logs, other kind of output here.

## Additional context

Add any other context about the problem here.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: true
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for mark
title: ''
labels: feature
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is and what the feature provides.

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"
61 changes: 37 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -4,45 +4,57 @@ on:
push:
branches:
- master
tags:
- '*'
pull_request:
branches:
- master

env:
GO_VERSION: "~1.20.2"
GO_VERSION: "~1.23"

jobs:
# Runs Golangci-lint on the source code
ci-go-lint:
name: ci-go-lint
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Set up Go 1.x
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v6

# Runs markdown-lint on the markdown files
ci-markdown-lint:
name: ci-markdown-lint
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: markdownlint-cli2-action
uses: DavidAnson/markdownlint-cli2-action@v19

# Executes Unit Tests
ci-unit-tests:
name: ci-unit-tests
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Set up Go 1.x
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: Run unit tests
run: |
make test
@@ -52,15 +64,15 @@ jobs:
name: ci-build
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Set up Go 1.x
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: Build mark
run: |
make build
@@ -71,30 +83,31 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Build only (on commits)
uses: docker/build-push-action@v4
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
uses: docker/build-push-action@v6
if: ${{ github.ref_type != 'tag' }}
with:
push: false
tags: kovetskiy/mark:latest

- name: Login to Docker Hub
uses: docker/login-action@v2
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: docker/login-action@v3
if: ${{ github.ref_type == 'tag' }}
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build and push (on tag)
uses: docker/build-push-action@v4
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: docker/build-push-action@v6
if: ${{ github.ref_type == 'tag' }}
with:
push: true
platforms: linux/amd64,linux/arm64
tags: |
kovetskiy/mark:${{ steps.extract_tag.outputs.tag }}
kovetskiy/mark:${{ github.ref_name }}
kovetskiy/mark:latest
12 changes: 6 additions & 6 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
@@ -10,18 +10,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set Up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: "1.23"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: release --rm-dist
version: "~> 2"
args: release --clean
env:
GOPATH: /home/runner/work/
GITHUB_TOKEN: ${{ secrets.TOKEN }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/mark
/docker
/testdata
.idea/
/mark.test
/profile.cov
.vscode
20 changes: 12 additions & 8 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
version: 2
before:
hooks:
# You may remove this if you don't use go modules.
@@ -14,13 +15,16 @@ builds:
- linux
# windows fails with an error https://github.com/kovetskiy/mark/runs/5034726426?check_suite_focus=true
# - windows
goarch:
- amd64
- arm64
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
- name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
checksum:
name_template: 'checksums.txt'
snapshot:
@@ -36,7 +40,7 @@ changelog:
brews:
-
name: mark
tap:
repository:
owner: kovetskiy
name: homebrew-mark
branch: master
@@ -47,7 +51,7 @@ brews:

commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}"

folder: Formula
directory: Formula

homepage: "https://github.com/kovetskiy/mark"
description: "Sync your markdown files with Confluence pages."
12 changes: 12 additions & 0 deletions .markdownlint-cli2.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"globs": [
"*.md",
".github/**/*.md"
],

// ToDo: Following rules can't be fixed automatically. They should be enabled when fixed.
"config": {
"MD013": false, // https://github.com/markdownlint/markdownlint/blob/main/docs/RULES.md#md013---line-length
"MD033": false // https://github.com/markdownlint/markdownlint/blob/main/docs/RULES.md#md033---inline-html
}
}
13 changes: 10 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
FROM golang:1.20.2 as builder
FROM golang:1.23.6 AS builder
ENV GOPATH="/go"
WORKDIR /go/src/github.com/kovetskiy/mark
COPY / .
RUN make get \
&& make build

FROM alpine:3.17
RUN apk --no-cache add ca-certificates bash sed git
FROM chromedp/headless-shell:latest
RUN apt-get update \
&& apt-get upgrade -qq \
&& apt-get install --no-install-recommends -qq ca-certificates bash sed git dumb-init \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

COPY --from=builder /go/src/github.com/kovetskiy/mark/mark /bin/
WORKDIR /docs

ENTRYPOINT ["dumb-init", "--"]
Loading