Skip to content
New issue

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

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

Already on GitHub? # to your account

referential links in markdown are linted when they shouldn't be #912

Closed
1 task done
ryanfoxtyler opened this issue Oct 18, 2024 · 8 comments
Closed
1 task done

Comments

@ryanfoxtyler
Copy link

Check for existing issues

  • Completed

Environment

OS: macOS
install method: Trunk
version: 3.7.1

Describe the bug / provide steps to reproduce it

We have a custom vocab entry for CLI which works correctly in most cases. The following line is throwing a linting error for the lowercase version in the link.

When using [Hyp CLI](/hyp-cli) alongside the Modus CLI, users get access to [Hypermode-hosted models](/hosted-models) for local development.

vale.ini file

StylesPath = styles

Vocab = general

MinAlertLevel = suggestion

Packages = Google

[formats]
mdx = md

[*.{mdx}]
BasedOnStyles = Vale, Google
Google.Exclamation = OFF
Google.Parens = OFF
Google.We = OFF
@jdkato
Copy link
Member

jdkato commented Oct 18, 2024

Can you share the whole file? The issue is not reproducible with that paragraph.

@ryanfoxtyler
Copy link
Author

ryanfoxtyler commented Oct 18, 2024

---
title: Hyp CLI
description: "Comprehensive reference for the Hyp CLI commands and usage"
---

Hyp CLI is a command-line tool for managing your Hypermode account and projects.
When using Hyp CLI alongside the Modus CLI, users get access to
[Hypermode-hosted models](/hosted-models).

## Install

Install Hyp CLI via a cURL command or npm.

<CodeGroup>

```bash cURL
curl -sSL http://install.hypermode.com/hyp.sh | bash
```

```js npm
npm install -g @hypermode/hyp
```

</CodeGroup>

## Commands

### `login`

Log in to your Hypermode account. When executed, this command redirects to the
Hypermode website to authenticate. It stores an authentication token locally and
prompts you to select your organization context.

### `logout`

Log out of your Hypermode account. This command clears your local authentication
token.

### `org switch`

Switch to a different org context within the CLI session.

@jdkato
Copy link
Member

jdkato commented Oct 18, 2024

I still can't reproduce it.

Is that your complete .vale.ini? Your not using any BlockIgnores or TokenIgnores?

@ryanfoxtyler
Copy link
Author

Sorry, gave you the wrong file that's triggering the issue. Here's the correct one.

Yes, that's the complete .vale.ini. We're running it through Trunk if that changes anything?

---
title: Modus CLI
description: "Comprehensive reference for the Modus CLI commands and usage"
---

The Modus CLI is a command-line tool for interacting with your Modus app and
running it locally.

## Install

Install Modus CLI via a cURL command or npm.

<CodeGroup>

```bash cURL
curl -sSL http://install.hypermode.com/modus.sh | bash
```

```js npm
npm install -g @hypermode/modus-cli
```

</CodeGroup>

## Commands

### `new`

Initialize a new Modus app. The Modus CLI prompts you to enter the app name and
language of choice.

### `dev`

Run your Modus app locally. The Modus CLI starts a local server and provides a
URL to access the app.

<Tip>
  When using [Hyp CLI](/hyp-cli) alongside the Modus CLI, users get access to
  [Hypermode-hosted models](/hosted-models) for local development.
</Tip>

### `build`

Build your Modus app. The Modus CLI compiles your app and generates a `.build`
folder for the artifacts.

### `uninstall`

Uninstall the Modus CLI from your system.

@jdkato
Copy link
Member

jdkato commented Oct 20, 2024

This is due to the use of JSX -- since MDX is not an officially supported format, the best you can do in these cases is ignore the block entirely using BlockIgnores.

But this is not a bug with Vale's Markdown processing. #841 is a related issue (although, I don't currently see a good solution there).

@jdkato jdkato closed this as completed Oct 20, 2024
@ryanfoxtyler
Copy link
Author

Is there something blocking stripping out the JSX tags like any other HTML tags when preparing the doc for linting? If I take out the tags, this works as expected so it seems like those aren't being removed properly.

Alternatively, would a token ignore for \]\([^)]*\) work, or would that cause other issues?

@jdkato
Copy link
Member

jdkato commented Oct 20, 2024

Vale does not strip any HTML tags; such a strategy would defeat its purpose of being markup-aware (i.e., the expectation that it ignore links).

The ignore pattern needs to target the entire JSX block.

@ryanfoxtyler
Copy link
Author

Got it. I think we'll add additional capitalization options in the vocab as a workaround while there's not full MDX support. Thanks for taking a look!

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants