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

[Code Blocks] Allow <pre> to contain <code> child #147

Merged
merged 1 commit into from
Jan 11, 2022
Merged

Conversation

seshrs
Copy link
Member

@seshrs seshrs commented Jan 11, 2022

Context

While browsing EECS 183 Project 1, I saw the following code block that had a differently-styled first-line:

<pre><code>if (loaves == 1) {
    //do something
} else if (loaves == 2) {
    //do something else
} // and so on</code></pre>

I had not anticipated that a manual <pre> block might also contain a single <code> block child. This commit modifies the code-block detection algorithm to look ignore the inner <code> block if applicable.

Validation

Before After
Screen Shot 2022-01-11 at 11 58 42 AM Screen Shot 2022-01-11 at 11 58 16 AM

@seshrs seshrs added the semver/patch Pull Request proposes "patch" change label Jan 11, 2022
@seshrs seshrs added this to the WN 2022 milestone Jan 11, 2022
@github-actions
Copy link
Contributor

The spec from this PR is available at https://preview.sesh.rs/previews/eecs485staff/primer-spec/147/.

(Available until Thu Feb 10 2022.)

@seshrs seshrs merged commit f11735a into develop Jan 11, 2022
@seshrs seshrs deleted the code-block-fixes branch January 11, 2022 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/patch Pull Request proposes "patch" change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant