Skip to content

Rule Change: Add languageOnly option to fenced-code-language rule #477

@TKDev7

Description

@TKDev7

What rule do you want to change?

fenced-code-language

What change do you want to make?

Generate more warnings

How do you think the change should be implemented?

A new option

Example code

```js startline=3
const message = "Hello, world!";
console.log(message);
```

What does the rule currently do for this code?

Currently, the rule only validates the presence and allowance of the language identifier. It ignores any additional content in the info string (e.g., startline=3).

What will the rule do after it's changed?

When languageOnly is true, the rule will report an error if the info string contains anything beyond the language identifier itself.

Participation

  • I am willing to submit a pull request to implement this change.

Additional comments

This option aligns with markdownlint's MD040 rule's language_only parameter, offering stricter control and promoting consistent rendering.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Ready to Implement

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions