Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Syntax highlighting broken in Markdown with inline comment at method definition line #292

Open
AlexWayfer opened this issue Feb 9, 2021 · 0 comments

Comments

@AlexWayfer
Copy link

AlexWayfer commented Feb 9, 2021

Description

In the title.

Steps to Reproduce

Have a Markdown code like:

You can handle errors by protected #server_error method with exception argument
(calling super is recommended).

def index(method)
  raise 'Error'
end

protected

def server_error(exception) # => 'Error'
  @my_var = true
  super
end

Private methods for helpers (model_params, for example).

Get current response body: body. Set: body 'New body'.

Expected behavior:

Normal Makrdown highlighting after Ruby block:

image

Actual behavior:

image

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)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant