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

Switch warning blocks to use admonitions #1595

Merged
merged 7 commits into from
Sep 3, 2024

Commits on Aug 29, 2024

  1. Allow admonition blockquotes with blank lines

    This fixes an issue where if an admonition blockquote had multiple
    paragraphs, it would incorrectly interpret it as multiple blockquotes,
    and break the formatting. The problem is that the regex was expecting at
    least one space after the `>`.
    
    I vaguely recall doing this intentionally, but I don't remember now why
    I did it this way, and I can't find any problems with this approach.
    ehuss committed Aug 29, 2024
    Configuration menu
    Copy the full SHA
    3de8d78 View commit details
    Browse the repository at this point in the history
  2. Include the admonition term at the start of the admonition

    This adds the term ("Warning") at the beginning of the admonition with a
    standardized styling (bold italics, with a colon). This ensures uniform
    styling.
    ehuss committed Aug 29, 2024
    Configuration menu
    Copy the full SHA
    65c7bc2 View commit details
    Browse the repository at this point in the history
  3. Fix indented admonitions

    This fixes the formatting for admonitions when they are indented. The
    code was missing the indentation for the parts that it was adding, which
    made it overall inconsistent and fail to render correctly.
    ehuss committed Aug 29, 2024
    Configuration menu
    Copy the full SHA
    de2c4a1 View commit details
    Browse the repository at this point in the history
  4. De-wrap warning blocks

    ehuss committed Aug 29, 2024
    Configuration menu
    Copy the full SHA
    9d40c46 View commit details
    Browse the repository at this point in the history
  5. Switch warnings from div to blockquote admonitions

    This switches the custom div-based warnings to the admonition syntax
    provided by the mdbook-spec extension.
    ehuss committed Aug 29, 2024
    Configuration menu
    Copy the full SHA
    5cb0567 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    5cbf08b View commit details
    Browse the repository at this point in the history
  7. Fix CSS styling for warning admonitions

    Now that warnings are wrapped in blockquotes, the CSS needs to be
    adjusted for that.
    
    This also includes a minor fix for the `::before` rule so that it only
    applies to the first paragraph in a multi-paragraph warning.
    ehuss committed Aug 29, 2024
    Configuration menu
    Copy the full SHA
    4b0cb6c View commit details
    Browse the repository at this point in the history