smartparens icon indicating copy to clipboard operation
smartparens copied to clipboard

sp-get-hybrid-sexp does not work if the sexp is a comment

Open Fuco1 opened this issue 7 years ago • 0 comments

This might or might not be expected, but I would prefer this working as regular hybrid sexps.

Expected behavior

|	/**
	 * @return array
	 */
	public function jsonSerialize()
	{
		return [
			'id' => $this->getIdOrInternalId(),
			'key' => $this->key,
			'value' => $this->value,
		];
	}

Getting the hybrid sexp at point should return the docstring

Actual behavior

Nothing is returned (actually, an invalid structure with beg > end)

Environment & version information

  • smartparens version: master
  • Active major-mode: php-mode
  • Smartparens strict mode: t
  • Emacs version (M-x emacs-version): GNU Emacs 25.2.1 (x86_64-unknown-linux-gnu) of 2017-10-25
  • Starterkit/Distribution: Vanilla
  • OS: gnu/linux

Fuco1 avatar Jun 26 '18 11:06 Fuco1