Skip to content

Include is not escaped by a code block #717

@ejiektpobehuk

Description

@ejiektpobehuk

What happened?

The include in the following example gets processed:

```
<!-- Include: example.md -->
```

So the Confluence page gets a code block with:

The contents of the example.md

What did you expect to happen?

The content of a code block is left untouched. So that the Confluence page would show a code block with:

<!-- Include: example.md -->

How can we reproduce the behavior you experienced?

Steps to reproduce the behavior:

  1. Create a file to include
  2. Create a page that includes the first file in a code block
  3. Run mark
  4. Check the Confluence page with the include

Further Information (please complete the following information)

  • Mark Version: mark version 15.3.0@none from nixpkgs
  • Mark Parameters: --files
  • Confluence Hosting: Server
  • Confluence Version: v9.2.13
  • Environment specific Information: running in a GitLab CI/CD pipeline

Logs or other output

Nothing abnormal in the logs

Additional context

Here is my usecase:

I have a Confluence page dedicate to mark.
Somewhere in the page there is an example of mark heading. In the source code in looks like this:

```
<!-- Space: EXMPLSPC -->
<!-- Title: Documentation as code -->
<!-- Include: shared/disclaimer.md -->
```

I want my users to copy this part as is.

Unfortunately, only the first two line stay the same while the last one changes to the contents of the shared/disclaimer.md file:

<!-- Space: EXMPLSPC -->
<!-- Title: Documentation as code -->
!!! warning Disclaimer
  This page is generated from a Markdown file in [${CI_PROJECT_NAME}][docs-repo].
  …

[docs-repo]: ${CI_PROJECT_URL}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions