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

header style: atx for h1, h2, ...? #130

Open
ruleset opened this issue Jun 27, 2024 · 1 comment
Open

header style: atx for h1, h2, ...? #130

ruleset opened this issue Jun 27, 2024 · 1 comment

Comments

@ruleset
Copy link

ruleset commented Jun 27, 2024

is there a way to cause Markdown Paste to always use atx style headings?
maybe there is a rule regex? or a toggle?

thanks!

when I paste formatted html using markdown paste, I get setext style for the first two levels.

Header 1
========

Header 2
--------

### Header 3

#### Header 4

##### Header 5

###### Header 6

The desired paste result would use ATX style headings.

# Header 1

## Header 2

### Header 3

#### Header 4

##### Header 5

###### Header 6

https://www.markdownguide.org/basic-syntax/#headings

I searched for vscode configurations, lint correctors, etc.

Hash-style headings would be consistent and avoid lint messages such as the following.
MD003/heading-style: Heading style [Expected: atx; Actual: setext]markdownlint[MD003]

@telesoho
Copy link
Owner

@ruleset

You can use MarkdownPaste.turndownOptions in vscode setting like this.

  "MarkdownPaste.turndownOptions": {
    "headingStyle": "atx",
    "bulletListMarker": "-",
    "strongDelimiter": "**",
    "emDelimiter": "*",
    "preformattedCode": "true",
    "hr": "\n\n* * * *\n\n"
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants