- 
                Notifications
    
You must be signed in to change notification settings  - Fork 80
 
          feat: handle CR and CRLF in no-missing-atx-heading-space
          #555
        
          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
          
     Merged
      
      
            mdjermanovic
  merged 20 commits into
  main
from
fix-handle-cr-in-no-missing-atx-heading-space
  
      
      
   
  Oct 22, 2025 
      
    
  
     Merged
                    Changes from 18 commits
      Commits
    
    
            Show all changes
          
          
            20 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      42794ab
              
                wip
              
              
                lumirlumir a80183a
              
                wip
              
              
                lumirlumir 3c86d51
              
                wip
              
              
                lumirlumir b1b44c7
              
                wip: add test (error)
              
              
                lumirlumir 495f65b
              
                wip
              
              
                lumirlumir 26e5eb2
              
                wip
              
              
                lumirlumir 4af023a
              
                wip: simplify
              
              
                lumirlumir 8d51e20
              
                wip
              
              
                lumirlumir a122482
              
                Merge branch 'main' of https://github.com/eslint/markdown into fix-ha…
              
              
                lumirlumir 4c9e924
              
                wip: test
              
              
                lumirlumir 5aad55b
              
                wip
              
              
                lumirlumir 312243f
              
                wip
              
              
                lumirlumir 36c9e60
              
                wip: resolve Bun CI failure
              
              
                lumirlumir ad01802
              
                wip: resolve Bun CI error (`semver`)
              
              
                lumirlumir 12b6931
              
                Merge branch 'main' of https://github.com/eslint/markdown into fix-ha…
              
              
                lumirlumir 900ac55
              
                wip: add test case for LS and PS
              
              
                lumirlumir c815d60
              
                wip: remove `m` flag
              
              
                lumirlumir e47364c
              
                Merge branch 'main' of https://github.com/eslint/markdown into fix-ha…
              
              
                lumirlumir 70ef43b
              
                Merge branch 'main' of https://github.com/eslint/markdown into fix-ha…
              
              
                lumirlumir 85dc6e6
              
                Update src/rules/no-missing-atx-heading-space.js
              
              
                lumirlumir File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -62,6 +62,7 @@ const validHeadings = [ | |
| "Not a heading", | ||
| "This is a paragraph with a #hashtag", | ||
| "Text with # in the middle", | ||
| "foo\u2028\u2028#Bar\u2029\u2029#Baz", // with line and paragraph separators | ||
| 
     | 
||
| // 7. Code blocks containing hash symbols | ||
| // 7.1 Fenced code blocks | ||
| 
          
            
          
           | 
    @@ -463,6 +464,34 @@ const invalidTests = [ | |
| }, | ||
| ], | ||
| }, | ||
| { | ||
| code: "Text before\r\n#Heading with ``` code markers\r\nText after", | ||
| output: "Text before\r\n# Heading with ``` code markers\r\nText after", | ||
| errors: [ | ||
| { | ||
| messageId: "missingSpace", | ||
| data: { position: "after" }, | ||
| line: 2, | ||
| column: 1, | ||
| endLine: 2, | ||
| endColumn: 3, | ||
| }, | ||
| ], | ||
| }, | ||
| { | ||
| code: "Text before\r#Heading with ``` code markers\rText after", | ||
| output: "Text before\r# Heading with ``` code markers\rText after", | ||
| errors: [ | ||
| { | ||
| messageId: "missingSpace", | ||
| data: { position: "after" }, | ||
| line: 2, | ||
| column: 1, | ||
| endLine: 2, | ||
| endColumn: 3, | ||
| }, | ||
| ], | ||
| }, | ||
| 
         
      Comment on lines
    
      +481
     to 
      +494
    
   
  There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I changed the tag to   | 
||
| 
     | 
||
| { | ||
| code: " ##Heading 2", | ||
| 
          
            
          
           | 
    ||
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.