-
Notifications
You must be signed in to change notification settings - Fork 523
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
Replaces all pre-existing h4 tags in notecards with <strong> #4409
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work getting the ball rolling!
We love to see that green checkmark! tests are passing now, I'm not entirely sure what was holding them up. I had a few separate PRs that were failing late last night, in the "test dev server" suite. |
Oh I get it. The raw source doesn't have |
Ah, yeah that makes sense. Should we keep the id="note" applied to |
After viewing https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch earlier today, I noticed that there are quite a few notecards with What do you think @schalkneethling ? Should an I understand that |
Definitely just the clean |
Excellent, that is the current behavior, it transforms any Also, could you briefly explain how the fixtures should be created and tested/viewed? The last thread from Peter's review above explains where I'm at. I have the template |
ping @peterbe - @tannerdolby I will have to learn along with you here :) |
My best tip is to go back to the If you want to do regular
and then, in a new terminal type:
|
Just what I needed to get going. Thank you lots @peterbe ! I was able to setup a test fixture as I expected after following your proposed steps and looking at |
As expected, since we use <div class="notecard note">
<h4>foo</h4>
<p>one</p>
<p>two</p>
</div> but fails when there isn't a first-child <div class="notecard warning">
<h4>foo</h4>
some text
<p>two</p>
</div> After trying out a bunch of different combinations for filtering text nodes from |
Added some logic to handle the case of a <div class="notecard note">
<h4>Some heading</h4>
No paragraph here
<p>Paragraph 2</p>
</div>
<div class="notecard warning">
<h4>Some heading</h4>
<p>Paragraph 1</p>
<p>Paragraph 2</p>
</div> gets transformed to: <div class="notecard note"><p><strong>Some heading:</strong> No paragraph here</p><p>Paragraph 2</p></div>
<div class="notecard warning"><p><strong>Some heading:</strong> Paragraph 1</p><p>Paragraph 2</p></div> the |
ping for review :) @schalkneethling |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am happy with this work @tannerdolby - just want to see if @peterbe wants to take one more look.
Ok sounds great @schalkneethling! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, this should be a flaw. But I don't know if it's worth the effort because it's a lot of work.
Left some nits but otherwise, it seems to work great.
🎉 |
Fixes #4394
Replaces h4s for notecards that have it, otherwise leaves them be.
Page in screenshot: http://localhost:3000/en-US/docs/Glossary/HTML5