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

Improve doc notes #245

Merged
merged 2 commits into from
Aug 4, 2022
Merged

Improve doc notes #245

merged 2 commits into from
Aug 4, 2022

Conversation

driesvints
Copy link
Member

@driesvints driesvints commented Aug 2, 2022

This PR allows to handle the new note format for markdown files that GitHub provides. It also provides backwards compatibility for the old docs.

Before, when reading Markdown files on GitHub for our docs you saw these unformatted notes:

Screenshot 2022-08-02 at 15 16 08

But GitHub has since adopted an official syntax for these notes. In laravel/docs#8092 I've updated all notes in the 9.x docs to the new syntax. Which makes them look like this:

Screenshot 2022-08-02 at 15 17 52

Because of the new syntax, we need to adopt a new regex to parse them. That's what this PR does. At the same time I'm filtering on legacy versions to the old docs are unaffected.

Henceforth, the new syntax for writing notes in our docs will be:

> **Note**  
> A general tip

And:

> **Warning**  
> This requires special attention

It's probably best to first merge the docs PR laravel/docs#8092 and then launch this PR with the new formatting. After merging the docs PR, it'll also need to be merged into master so the changes are applied there as well.

@taylorotwell
Copy link
Member

@driesvints is it possible to adjust this PR such that it supports both formats in order to eliminate any possibility of breakage?

@driesvints
Copy link
Member Author

@taylorotwell done. I've rewrote the code so it'll check both and format them accordingly.

@driesvints
Copy link
Member Author

Now it's possible to first merge and deploy this PR and then laravel/docs#8092

@driesvints driesvints requested a review from taylorotwell August 4, 2022 11:22
@taylorotwell taylorotwell merged commit 67a0d22 into master Aug 4, 2022
@taylorotwell taylorotwell deleted the improve-doc-notes branch August 4, 2022 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants