docs(book): include PRQL changelog in book#2348
Conversation
CHANGELOG.md
Outdated
| be a string in any format. (@aljazerzen & @snth, #1514) | ||
|
|
||
| ```prql | ||
| ```elm |
There was a problem hiding this comment.
Should these never be prql?
Maybe we add a grep lint in pre-commit if so; otherwise folks are going to forget?
Or are they OK / actually good in prql?
There was a problem hiding this comment.
Thank you for your review.
The problem here is that in the book the prql code blocks are evaluated by the preprocessor and displayed alongside the sql code blocks.
If we could disable the evaluation of prql code blocks throughout the particular file with ignore settings, special comments or yaml front matter, I think we could continue to use prql code blocks there.
Is that possible now?
Maybe we add a grep lint in
pre-commitif so; otherwise folks are going to forget?
I did not know of a solution that would make that possible. This is a good method at this stage!
There was a problem hiding this comment.
prql_no_test will skip over creating a comparison table: https://github.com/prql/prql/blob/13d0060dfe80ee3ab098b85207ef6fae9d367a55/web/book/src/lib.rs#L155
(Though do we sometimes want a comparison table?)
There was a problem hiding this comment.
I think the issue here is the gap between rendering on GitHub and rendering on Book.
That is, if prql code blocks are recognized on GitHub in the future (#1636), Changelog will need to use prql code blocks, but may not want to output sql on the Book.
There was a problem hiding this comment.
Considering that the syntax has changed and past prql code block can no longer be compiled, Changelog still needs to disable prql code evaluation on a file-by-file basis.
There was a problem hiding this comment.
Yes, I actually thought I'd make a change to use a list, quick PR at https://github.com/PRQL/prql/pull/2350/files
(doesn't affect this PR though)
There was a problem hiding this comment.
Wow, wonderfully fast work, thanks!
So can we merge this PR now?
There was a problem hiding this comment.
What should the instructions for including change blocks here be? "Always use elm"? "Only use prql if you want a comparison table"?
There was a problem hiding this comment.
What should the instructions for including change blocks here be? "Always use
elm"? "Only useprqlif you want a comparison table"?
Good point.
It seems we need to stay with elm for now.
For now, it seems that when the prql code block is evaluated, a header PRQL is added and the display is corrupted.
Lines 315 to 327 in fe1b7d4
|
One thing we want to avoid here is:
We could run |
* refactor: Use tags for the language code blocks Idea from #2348 * change to spaces
|
I added |
|
Perfect! Should we also add a https://pre-commit.com/#pygrep so no one puts a |
|
|
It would be great if we could automatically link to issue numbers and GitHub user accounts like |
for more information, see https://pre-commit.ci
Yes totally. A challenge for the future (...generations...)! |
|
I hit the button to get this in for 0.7.0, hope that's OK! |
|
In! Thanks @eitsupi ! |
|
Thanks! |
* refactor: Use tags for the language code blocks Idea from PRQL#2348 * change to spaces
Close PRQL#2344 Since `prql` code blocks in md files included in the Book will evaluated and replace with html, this PR introduce a new Option `no-eval` that modifies the Book preprocessor to not evaluate Changelog's `prql` code blocks. Also add a pre-commit hook to avoid using bare `prql` code blocks on `CHANGELOG.md`. --------- Co-authored-by: Maximilian Roos <5635139+max-sixty@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Close #2344
Since
prqlcode blocks in md files included in the Book will evaluated and replace with html, this PR introduce a new Optionno-evalthat modifies the Book preprocessor to not evaluate Changelog'sprqlcode blocks.Also add a pre-commit hook to avoid using bare
prqlcode blocks onCHANGELOG.md.