Skip to content

Commit

Permalink
Update markdown extension list
Browse files Browse the repository at this point in the history
  • Loading branch information
Earlopain authored and palkan committed Dec 12, 2023
1 parent 7c04c44 commit aaf7820
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/rubocop/markdown/rubocop_ext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

module RuboCop
module Markdown # :nodoc:
# According to Linguist.
# See https://github.com/github/linguist/blob/96ca71ab99c2f9928d5d69f4c08fd2a51440d045/lib/linguist/languages.yml#L3065-L3083
# According to Linguist. mdx was dropped but is being kept for backwards compatibility.
# See https://github.com/github-linguist/linguist/blob/8c380f360ce00b95fa08d14ce0ebccd481af1b33/lib/linguist/languages.yml#L4088-L4098
MARKDOWN_EXTENSIONS = %w[
.md
.livemd
.markdown
.mdown
.mdwn
Expand All @@ -14,6 +15,7 @@ module Markdown # :nodoc:
.mkdn
.mkdown
.ronn
.scd
.workbook
].freeze

Expand Down
3 changes: 3 additions & 0 deletions test/fixtures/file_extensions/11.livemd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```ruby
puts 'John'
```
3 changes: 3 additions & 0 deletions test/fixtures/file_extensions/12.scd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```ruby
puts 'John'
```
2 changes: 2 additions & 0 deletions test/integration_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ def test_file_extensions
assert_includes res, "file_extensions/08.mkdown:"
assert_includes res, "file_extensions/09.ronn:"
assert_includes res, "file_extensions/10.workbook:"
assert_includes res, "file_extensions/11.livemd:"
assert_includes res, "file_extensions/12.scd:"
end

def test_in_flight_parsing
Expand Down

0 comments on commit aaf7820

Please sign in to comment.