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

close code block for issubnormal docstring #48893

Merged
merged 1 commit into from
Mar 5, 2023
Merged

close code block for issubnormal docstring #48893

merged 1 commit into from
Mar 5, 2023

Conversation

udohjeremiah
Copy link
Contributor

Completes the code block for issubnormal which is currently:

"""
    issubnormal(f) -> Bool

Test whether a floating point number is subnormal.

An IEEE floating point number is [subnormal](https://en.wikipedia.org/wiki/Subnormal_number)
when its exponent bits are zero and its significand is not zero.

# Examples
```jldoctest
julia> floatmin(Float32)
1.1754944f-38

julia> issubnormal(1.0f-37)
false

julia> issubnormal(1.0f-38)
true
"""

Adds "```" before """ at the end

@inkydragon inkydragon added the docs This change adds or pertains to documentation label Mar 4, 2023
Copy link
Member

@inkydragon inkydragon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@inkydragon inkydragon added the merge me PR is reviewed. Merge when all tests are passing label Mar 4, 2023
@dkarrasch dkarrasch merged commit ae751e1 into JuliaLang:master Mar 5, 2023
@dkarrasch dkarrasch removed the merge me PR is reviewed. Merge when all tests are passing label Mar 5, 2023
@giordano
Copy link
Contributor

giordano commented Mar 5, 2023

@mortenpi this isn't the first problem like this that has been fixed recently. Is there a way to automatically detect unclosed fences in docstrings?

@mortenpi
Copy link
Contributor

mortenpi commented Mar 6, 2023

Bit tricky, because any sequence of characters is valid Markdown. This unclosed code blocks are perfectly valid Markdown.

I suppose, in principle, we could detect paragraph that start with backticks, as that is likely to be an error:

julia> using Markdown

julia> m = md"""
       XYZ

       ```julia
       xyz
       """
  XYZ

  ```julia xyz

julia> m.content
2-element Vector{Any}:
 Markdown.Paragraph(Any["XYZ"])
 Markdown.Paragraph(Any["```julia xyz"])

Actually, that might be reasonably safe, since if you escape the fences, you actually get a slightly different AST:

julia> m = md"""
       XYZ

       \```julia
       xyz

       ```
       """
  XYZ

  ```julia xyz

  ```

julia> m.content
3-element Vector{Any}:
 Markdown.Paragraph(Any["XYZ"])
 Markdown.Paragraph(Any["`", "``julia xyz"])
 Markdown.Paragraph(Any["```"])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This change adds or pertains to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants