Project

General

Profile

Bug #16014

Updated by nobu (Nobuyoshi Nakada) almost 5 years ago

## Description **Description** 
 Ruby toggle block not chomping trailing whitespace in block 

 ## Reproduction guide 

 **Reproduction guide**  
 * Start Emacs 
 * Create a ruby file 
 * Write a block such as 
   `(1..10).map 
 * (1..10).map { |number| number * 2 }` } 
 * Use `ruby-toggle-block` ruby-toggle-block , - T - { 

 ## Observed behaviour **Observed behaviour** 

 Command does not chomp off a whitespace after line as follows 
 ```ruby 
 (1..10).map do |number| 
   number * 2  
 end 
 ``` 

 ## Expected behaviour **Expected behaviour** 

 No trailing whitespace 

 ## System Info **System Info** 
 Ruby version: 2.6.3  
 OS: darwin 
 Emacs: 26.1 
 Spacemacs: 0.300.0 
 Spacemacs branch: develop (rev. 2bef3f6) 
 Graphic display: t 
 Distribution: spacemacs 
 Editing style: vim 
 Completion: helm 
 Layers: 

     
 (python erlang sql ansible csv racket clojure php javascript html yaml ruby helm auto-completion emacs-lisp git 
             
         (markdown :variables markdown-live-preview-engine 'vmd) 
             
         org 
             
         (shell :variables shell-default-height 30 shell-default-position 'bottom) 
             
         spell-checking syntax-checking) 

 
 System configuration features: JPEG RSVG IMAGEMAGICK NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS LCMS2 

 This bug duplicates an issue originally reported here Description :octocat: 
 Ruby toggle block not chomping trailing whitespace in block 

 Reproduction guide 🐞 
 Start Emacs 
 Create a ruby file 
 Write a block such as 
 (1..10).map { |number| number * 2 } 
 Use ruby-toggle-block , - T - { 
 Observed behaviour: 👀 💔 

 Command inserts a whitespace after line as follows 
 (1..10).map do |number| 
   number * 2  
 end 
 Expected behaviour: ❤️ 😄 

 No trailing whitespace 
 System Info 💻 
 OS: darwin 
 Emacs: 26.1 
 Spacemacs: 0.300.0 
 Spacemacs branch: develop (rev. 2bef3f6) 
 Graphic display: t 
 Distribution: spacemacs 
 Editing style: vim 
 Completion: helm 
 Layers: 
 (python erlang sql ansible csv racket clojure php javascript html yaml ruby helm auto-completion emacs-lisp git 
         (markdown :variables markdown-live-preview-engine 'vmd) 
         org 
         (shell :variables shell-default-height 30 shell-default-position 'bottom) 
         spell-checking syntax-checking) 
 System configuration features: JPEG RSVG IMAGEMAGICK NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS LCMS2 
 Description :octocat: 
 Ruby toggle block not chomping trailing whitespace in block 

 Reproduction guide 🐞 
 Start Emacs 
 Create a ruby file 
 Write a block such as 
 (1..10).map { |number| number * 2 } 
 Use ruby-toggle-block , - T - { 
 Observed behaviour: 👀 💔 

 Command inserts a whitespace after line as follows 
 (1..10).map do |number| 
   number * 2  
 end 
 Expected behaviour: ❤️ 😄 

 No trailing whitespace 
 System Info 💻 
 OS: darwin 
 Emacs: 26.1 
 Spacemacs: 0.300.0 
 Spacemacs branch: develop (rev. 2bef3f6) 
 Graphic display: t 
 Distribution: spacemacs 
 Editing style: vim 
 Completion: helm 
 Layers: 
 (python erlang sql ansible csv racket clojure php javascript html yaml ruby helm auto-completion emacs-lisp git 
         (markdown :variables markdown-live-preview-engine 'vmd) 
         org 
         (shell :variables shell-default-height 30 shell-default-position 'bottom) 
         spell-checking syntax-checking) 
 System configuration features: JPEG RSVG IMAGEMAGICK NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS LCMS2Description :octocat: 
 Ruby toggle block not chomping trailing whitespace in block 

 Reproduction guide 🐞 
 Start Emacs 
 Create a ruby file 
 Write a block such as 
 (1..10).map { |number| number * 2 } 
 Use ruby-toggle-block , - T - { 
 Observed behaviour: 👀 💔 

 Command inserts a whitespace after line as follows 
 (1..10).map do |number| 
   number * 2  
 end 
 Expected behaviour: ❤️ 😄 

 No trailing whitespace 
 System Info 💻 
 OS: darwin 
 Emacs: 26.1 
 Spacemacs: 0.300.0 
 Spacemacs branch: develop (rev. 2bef3f6) 
 Graphic display: t 
 Distribution: spacemacs 
 Editing style: vim 
 Completion: helm 
 Layers: 
 (python erlang sql ansible csv racket clojure php javascript html yaml ruby helm auto-completion emacs-lisp git 
         (markdown :variables markdown-live-preview-engine 'vmd) 
         org 
         (shell :variables shell-default-height 30 shell-default-position 'bottom) 
         spell-checking syntax-checking) 
 System configuration features: JPEG RSVG IMAGEMAGICK NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS LCMS2 


 Description :octocat: 
 Ruby toggle block not chomping trailing whitespace in block 

 Reproduction guide 🐞 
 Start Emacs 
 Create a ruby file 
 Write a block such as 
 (1..10).map { |number| number * 2 } 
 Use ruby-toggle-block , - T - { 
 Observed behaviour: 👀 💔 

 Command inserts a whitespace after line as follows 
 (1..10).map do |number| 
   number * 2  
 end 
 Expected behaviour: ❤️ 😄 

 No trailing whitespace 
 System Info 💻 
 OS: darwin 
 Emacs: 26.1 
 Spacemacs: 0.300.0 
 Spacemacs branch: develop (rev. 2bef3f6) 
 Graphic display: t 
 Distribution: spacemacs 
 Editing style: vim 
 Completion: helm 
 Layers: 
 (python erlang sql ansible csv racket clojure php javascript html yaml ruby helm auto-completion emacs-lisp git 
         (markdown :variables markdown-live-preview-engine 'vmd) 
         org 
         (shell :variables shell-default-height 30 shell-default-position 'bottom) 
         spell-checking syntax-checking) 
 System configuration features: JPEG RSVG IMAGEMAGICK NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS LCMS2Description :octocat: 
 Ruby toggle block not chomping trailing whitespace in block 

 Reproduction guide 🐞 
 Start Emacs 
 Create a ruby file 
 Write a block such as 
 (1..10).map { |number| number * 2 } 
 Use ruby-toggle-block , - T - { 
 Observed behaviour: 👀 💔 

 Command inserts a whitespace after line as follows 
 (1..10).map do |number| 
   number * 2  
 end 
 Expected behaviour: ❤️ 😄 

 No trailing whitespace 
 System Info 💻 
 OS: darwin 
 Emacs: 26.1 
 Spacemacs: 0.300.0 
 Spacemacs branch: develop (rev. 2bef3f6) 
 Graphic display: t 
 Distribution: spacemacs 
 Editing style: vim 
 Completion: helm 
 Layers: 
 (python erlang sql ansible csv racket clojure php javascript html yaml ruby helm auto-completion emacs-lisp git 
         (markdown :variables markdown-live-preview-engine 'vmd) 
         org 
         (shell :variables shell-default-height 30 shell-default-position 'bottom) 
         spell-checking syntax-checking) 
 System configuration features: JPEG RSVG IMAGEMAGICK NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS LCMS2 

 This bug duplicates an issue reported at spacemacs github repository issue #12548

Back