-
Notifications
You must be signed in to change notification settings - Fork 155
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
Code blocks leave ugly trailing blank lines #644
Comments
Fixed in 9.0.4 by #653 |
@Dysme I'm still having this issue. It doesn't matter what the parent tag is for my code block, the extra whitespace is still included. In the code I linked I have the code block inside an /// <summary>
/// An <c>Acceleration</c> represents an acceleration in meters per second squared,
/// feet per second squared or
/// <a href="https://en.wikipedia.org/wiki/G-force#Unit_and_measurement">gees</a>.
/// It is stored as a number of meters per second squared.
/// </summary>
///
/// <example>
/// You can also do rate-related calculations with <c>Acceleration</c> values to compute
/// <c>Speed</c> or <c>Duration</c>:
/// <code lang="fsharp">
/// let changeInSpeed =
/// acceleration |> Quantity.for duration
/// let alsoChangeInSpeed =
/// duration |> Quantity.at acceleration
/// let duration =
/// changeInSpeed |> Quantity.at_ acceleration
/// </code>
/// </example>
///
/// <note>
/// Since <c>MetersPerSecondSquared</c> is defined as <c>Rate MetersPerSecond Seconds</c>
/// (change in speed per unit time), you can construct an <c>Acceleration</c>
/// value using <c>Quantity.per</c>:
/// <code lang="fsharp">
/// let acceleration =
/// changeInSpeed |> Quantity.per duration
/// </code>
/// </note>
[<CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>]
module Math.Units.Acceleration |
Thanks for pointing out @MaxWilson, this poor formatting is caused by PR #762 from @yazeedobaid. Deleting the HTML added by that PR fixes the formatting. Thoughts @yazeedobaid? |
@nhirschey I looked at PR #762 and the trim for the new line still exists. Please see this line. Maybe it is caused by a css rule that got applied after the addition of the |
I was adding documentation to fsharp-core-docs and at dsyme's suggestion I formatted the code blocks like so:
Unfortunately it seems that that leaves ugly whitespace at the end of the code block (and I'm not wild about the indented left margin either). Partial screenshot:
Ideally fsdocs would trim the trailing whitespace within the code block, and also normalize left-indentation so that the outermost indented block isn't indented.
Known workaround
I can format my code-in-comments without whitespace within the code block:
That is tremendously ugly though, especially lack of spacing on the third line before "Some 42". The output looks nicer though (partial screenshot):
The text was updated successfully, but these errors were encountered: