language-ruby
language-ruby copied to clipboard
Syntax highlighting broken in Markdown with inline comment at method definition line
Description
In the title.
Steps to Reproduce
Have a Markdown code like:
You can handle errors by protected
#server_errormethod withexceptionargument (callingsuperis recommended).def index(method) raise 'Error' end protected def server_error(exception) # => 'Error' @my_var = true super endPrivate methods for helpers (
model_params, for example).Get current response body:
body. Set:body 'New body'.
Expected behavior:
Normal Makrdown highlighting after Ruby block:

Actual behavior:

Broken Markdown highlighting, like it's still in a Ruby code block.
Reproduces how often:
100% with the comment at a line with def.
Versions
Arch Linux.
> atom --version
Atom : 1.54.0
Electron: 6.1.12
Chrome : 76.0.3809.146
Node : 12.4.0
> apm --version
/usr/lib/node_modules/npm/lib/npm.js:130
throw new TypeError('must call as: npm.load(callback)')
^
TypeError: must call as: npm.load(callback)
at Object.load (/usr/lib/node_modules/npm/lib/npm.js:130:13)
at getPythonVersion (/usr/lib/node_modules/atom-package-manager/lib/apm-cli.js:155:16)
at printVersions (/usr/lib/node_modules/atom-package-manager/lib/apm-cli.js:94:12)
at Object.run (/usr/lib/node_modules/atom-package-manager/lib/apm-cli.js:223:16)
at Object.<anonymous> (/usr/lib/node_modules/atom-package-manager/bin/apm:9:30)
at Module._compile (node:internal/modules/cjs/loader:1108:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
at Module.load (node:internal/modules/cjs/loader:973:32)
at Function.Module._load (node:internal/modules/cjs/loader:813:14)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)