Kramdown::Document.new mutates provided :smart_quotes option value #782
              
  
  Closed
              
          
                  
                    
                      jeremyevans
                    
                  
                
                  started this conversation in
                General
              
            Replies: 1 comment 2 replies
-
| This is the expected behaviour for option values since it is assumed that the options hash passed in is then owned by kramdown (and the parser/converters that use it). The options hash may also be modified during parsing, e.g. https://github.com/gettalong/kramdown/blob/master/lib/kramdown/parser/kramdown/extensions.rb#L109-L133. | 
Beta Was this translation helpful? Give feedback.
                  
                    2 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
https://github.com/gettalong/kramdown/blob/master/lib/kramdown/options.rb#L415 mutates a
:smart_quotesoption passed when creating aKramdown::Document. In general, mutating arguments passed to a method should be avoided unless the purpose of the method is to mutate the arguments. Filing this as a discussion post and not an issue, since it's not technically a bug.Beta Was this translation helpful? Give feedback.
All reactions