Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vale not processing markdown files properly #3377

Closed
gilzow opened this issue Aug 24, 2023 · 0 comments · Fixed by #3378
Closed

Vale not processing markdown files properly #3377

gilzow opened this issue Aug 24, 2023 · 0 comments · Fixed by #3378
Assignees
Labels

Comments

@gilzow
Copy link
Collaborator

gilzow commented Aug 24, 2023

Where on docs.platform.sh should be changed?

https://github.com/platformsh/platformsh-docs/blob/main/.vale.ini#L12

What exactly should be updated?

When we add shortcodes to a markdown code block (see example below), we "break" the signature for a valid markdown code block. Vale no longer is able to determine that it is a code block and be ignore and instead parses it as just a string. This causes it to error because of the properties in the code block (e.g. passthru, post_deploy, etc). We can't add a new ignore pattern as a TokenIgnore because we need to ignore the entire block. Instead, we'll need to add a new block-level ignore pattern that can match a code block with a shortcode in the first line.

Example of a code block that breaks the markdown code block signature (ignoring the backslash for the closing marker as I couldn't figure out how to get markdown to escape it properly):

```yaml {configFile="app"}
hooks:
    deploy: |
        cd /app/public
        if [ "$PLATFORM_ENVIRONMENT_TYPE" = production ]; then
            # Do whatever you want on the production site.
        else
            drush -y sql:sanitize
        fi
        drush -y updatedb
\```

Additional context

No response

@gilzow gilzow added the bug label Aug 24, 2023
@gilzow gilzow self-assigned this Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant