File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -76,10 +76,11 @@ def document_attr_methods(method_objects)
7676
7777 sig { params ( attach_to : Documentable , docstring : T . nilable ( String ) , include_params : T ::Boolean ) . void }
7878 def parse_node ( attach_to , docstring , include_params : true )
79- docstring_ , directives = Directives . extract_directives ( docstring )
80- parse_sig ( docstring_ , include_params : include_params )
81- attach_to . docstring = docstring_ . to_raw
82- Directives . add_directives ( attach_to . docstring , directives )
79+ existing_docstring = docstring . is_a? ( YARD ::Docstring )
80+ docstring , directives = Directives . extract_directives ( docstring ) unless existing_docstring
81+ parse_sig ( docstring , include_params : include_params )
82+ attach_to . docstring = docstring . to_raw
83+ Directives . add_directives ( attach_to . docstring , directives ) unless existing_docstring
8384 end
8485
8586 sig { params ( docstring : YARD ::Docstring , include_params : T ::Boolean ) . void }
You can’t perform that action at this time.
0 commit comments