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

Can the rendered output contain more line breaks? #1923

Closed
mrft opened this issue Apr 19, 2022 · 2 comments
Closed

Can the rendered output contain more line breaks? #1923

mrft opened this issue Apr 19, 2022 · 2 comments
Labels
enhancement Improved functionality
Milestone

Comments

@mrft
Copy link

mrft commented Apr 19, 2022

Search terms

line length, git

Question

I don't know if this can be controlled with some configuration option somehow, but when I regenerate the docs for my project, I always end up having huge commits, because the first line of ./modules/index.html in my case contains over 13000 characters.
But the only part in that line that is actually different is

\<li>Defined in \<a href="https://github.com/mrft/itr8/blob/27bb704/src/types.ts#L28">types.ts:28\</a>

If it cannot be controlled by configuration, I guess this is a feature request to make sure that this part and the other highly dynamic parts will end up on a single line as much as possible. This would make git commits of the generated docs much easier to read and cleaner.

@mrft mrft added the question Question about functionality label Apr 19, 2022
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Apr 23, 2022

This seems like a reasonable feature request to me, gzip ought to take care of any whitespace, so I'm fine just adding some more line breaks... experimentation needed to figure out the best way to do this I think.

@Gerrit0 Gerrit0 added this to the v0.23 milestone Apr 23, 2022
@Gerrit0 Gerrit0 added this to To do in TSDoc - v0.23 via automation Apr 23, 2022
@Gerrit0 Gerrit0 moved this from To do to Done in TSDoc - v0.23 Apr 23, 2022
@Gerrit0 Gerrit0 added enhancement Improved functionality and removed question Question about functionality labels May 30, 2022
@Gerrit0 Gerrit0 mentioned this issue May 30, 2022
8 tasks
@Gerrit0 Gerrit0 mentioned this issue Jun 24, 2022
@mrft
Copy link
Author

mrft commented Dec 22, 2022

First of all:
I upgraded typedoc and saw that this feature improved the readability of the git commits tremendously! Thanks for that.

But: (there is always a but...)
1 thing that struck my eye was this: if I change an @example that contains a code block, everything inside is still on a single line of html.

So for example:

 * @example
 * ```typescript
 * // some comment
 * // and the next comment line

gets translated into the following html

<h3>Example</h3><pre><code class="language-typescript"><span class="hl-3">// some comment</span><br/><span class="hl-3">// and the next comment line</span><br/>

instead of adding a newline after the <br/> which would make more sense I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improved functionality
Projects
No open projects
Development

No branches or pull requests

2 participants