Releases: jeanpaulsio/codemirror-lang-ruby
v0.4.4
Fixed
- npm package missing README — Added
README.mdandLICENSEto thefilesfield inpackage.jsonso they are included in the published tarball.
Full Changelog: v0.4.3...v0.4.4
v0.4.3
Fixed
- Trailing comma inside delimiters — Pressing Enter after a line ending with a trailing comma inside
{},[], or()no longer adds an extra indent level. Added delimiter-depth detection so the continuation-indent logic defers todelimitedIndentinside brackets. - String interpolation false positive — The continuation regex's trailing-comment capture
(#.*)?$was matching#{interpolation}inside strings as a comment, causing lines like"Hello, #{@name}!"to be treated as trailing-comma continuations. Fixed by excluding#{from the comment pattern.
Added
- 14 new indent test cases (section 33 + unskipped 28b) covering hashes, arrays, method args, nested constructs, bare call continuations, and interpolated strings
Full Changelog: v0.4.2...v0.4.3
v0.4.2
What's Changed
Bug Fixes
- Heredocs with trailing code —
foo(<<~SQL)and<<~HEREDOC.stripnow parse without errors (#25). Uses a hybrid tokenizer approach: full token when no trailing code (body highlighted as string), opener-only token when trailing code exists (parser handles),.method, etc. correctly).
Documentation
- Updated README known limitations to reflect the heredoc fix
- Updated benchmark accuracy numbers — improvements across most projects:
- Sidekiq 93.5% → 95.6% (+2.1%)
- Grape 94.0% → 95.8% (+1.8%)
- Rails 94.3% → 96.0% (+1.7%)
- Fastlane 95.0% → 96.3% (+1.3%)
- Devise 98.1% → 98.3% (+0.2%)
Stats
- 105 tests passing
- 0 regressions
Full Changelog: v0.4.1...v0.4.2
v0.4.1
Fixes
Keyword arguments with receiver (Bug A)
obj.foo(a: 1), User.where(active: true), self.foo(kw: 1), and all receiver-style method calls with keyword args now parse correctly. Previously only foo(a: 1) (no receiver) worked.
Scoped constants in rescue (Bug B)
rescue Foo::Bar => e, rescue Foo::Bar, Baz => e, and rescue Foo::Bar::Baz => e now parse correctly.
24 new bare method names (Bug C)
Added common Rails/Ruby DSL methods: skip_before_action, skip_after_action, skip_around_action, class_methods, included, concerning, validates_presence_of, validates_uniqueness_of, validates_length_of, validates_format_of, has_and_belongs_to_many, after_initialize, after_find, before_destroy, after_destroy, before_update, after_update, before_validation, after_validation, rescue_from, helper_method, helper, memoize, freeze
Stats
- 49 bare methods (up from 25)
- 721 total tests across 7 suites (up from 575)
- 42 new tests for the three fixes
- Zero regressions
Full changelog: v0.4.0...v0.4.1
v0.4.0
What's new
Grammar fixes
::TopLevelleading scope resolution —::TopLevel,::TopLevel::Foo, andclass ::Foonow parse correctly- Hash patterns in
case/in—in {name: String => n}andin {name:}shorthand now supported - Find patterns in
case/in—in [*, 2, *]andin [*pre, value, *post]now supported
Bug fixes
- Auto-indent on Enter — Fixed
rubyIndentServiceto useIndentContext.lineAt()instead of raw document access, so pressing Enter afterdef foo(and other block openers) correctly indents the cursor
Docs
- README "What's supported" updated with new pattern matching and scope resolution features
- Removed 4 stale known limitations (symbol-key shorthand was already working, 3 bugs now fixed)
- Rails parse accuracy improved 94.2% → 94.3%
Stats
bug-check.mjs: 114 pass, 3 fail (down from 111 pass, 6 fail in v0.3.0)- All 575+ tests passing across 7 suites with zero regressions
Full changelog: v0.3.0...v0.4.0
v0.3.0
Highlights
- 575 tests across 7 suites (up from 105) — indentation, highlighting, folding, completion, grammar accuracy, performance, and integration
- 35 grammar bugs identified, 29 fixed — bare rescue in method bodies, lambdas without params, setter assignment, constants as method calls, and more
- Parse accuracy jumped from 85–91% to 93–98% across all real-world benchmark files (Rails, Jekyll, Devise, Faker, Fastlane, Grape, Sidekiq)
private def,protected def, andprivate_class_method defnow indent correctly- Mixed
do/end+{}block nesting no longer confuses the indent engine
What's Changed
See the full CHANGELOG for details.
Full Changelog: v0.2.0...v0.3.0
v0.2.0
Highlights
- Comprehensive indentation — 119 programmatic tests covering all Ruby indent/dedent patterns including block openers, mid-block keywords, closing delimiters, continuation lines, method chaining, and nested blocks
- Subscript expressions —
arr[0],hash[:key],matrix[i][j] - Setter & class method definitions —
def name=(value),def self.method_name - Indentation engine rewritten for robust handling of incomplete code while typing
What's Changed
See the full CHANGELOG for details.
Full Changelog: v0.1.0...v0.2.0