Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lazy properties documentation includes unneeded code #768

Closed
ilyapuchka opened this issue Apr 15, 2017 · 2 comments
Closed

Lazy properties documentation includes unneeded code #768

ilyapuchka opened this issue Apr 15, 2017 · 2 comments
Labels

Comments

@ilyapuchka
Copy link

When documenting lazy properties jazzy can include it's actual code as part of it's declaration documentation.

Example - https://github.com/krzysztofzablocki/Sourcery/blob/master/docs/Classes/TypesReflectionBox.html#L176 In this example = is included as part of declaration documentation.

If the property body is defined in the same line it will be completely included in the declaration documentation.

public lazy var classes: [Class] = { return self.types.flatMap { $0 as? Class } }()

This code produces the following html output:

<pre class="highlight"><code><span class="kd">public</span> <span class="kd">lazy</span> <span class="k">var</span> <span class="nv">classes</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Classes/Class.html">Class</a></span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="k">return</span> <span class="k">self</span><span class="o">.</span><span class="n">types</span><span class="o">.</span><span class="n">flatMap</span> <span class="p">{</span> <span class="nv">$0</span> <span class="k">as?</span> <span class="kt"><a href="../Classes/Class.html">Class</a></span> <span class="p">}</span> <span class="p">}()</span></code></pre>
@jpsim jpsim added the bug label Apr 15, 2017
@reitzig
Copy link

reitzig commented Apr 26, 2017

Related: #776, #777

@johnfairh
Copy link
Collaborator

Fixed via #902.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants