-
Notifications
You must be signed in to change notification settings - Fork 328
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
Permit the \page Token to accept {} values. #3899
Conversation
Is there a concern that this doesn't apply to the very first page which doesn't have a |
No, though the included code also tolerates putting a |
Would you mind creating an issue for this PR? So we have a place to document and discuss the problem this is aiming to solve. |
I cannot see this working in the deployment, although the rest seems to work fine. While this syntax works for us, it is also worth mentioning that codemirror stops processing that line as a IF we did it like with tables, that you need the injection to be in the next line:
That should preserve the code hightlight, and be somewhat intuitive and consistent. I wish we could keep it in the line though |
What can you not see? Regarding the syntax highlighting - yes, that's not there yet. |
adding |
No. It won't. This syntax only works on a |
For the first page, @5e-Cleric : |
Also, I'll just add this discussion that was on this same topic, before we started using named spans and |
Is there any risk of this breaking existing brews? I'm not sure if there would be any documents out there depending on a |
This should break no document. I have never seen or heard, or can think of any good reason to have an empty page at the top. |
This code (based on my master page code ) uses a slightly smarter function in place of the src/split('\page\n') we use now. Part of its logic is if element[0] in the split array is empty, it is dropped from the array. This allows backward compatibility with the current pattern and allows the use of |
The rest of my comment still stands, this breaks the highlight in an irrecuperable way, could we consider that other syntax? |
Should make the brewRender area a little easier to read.
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.
A couple things noted just testing quickly:
- The page number at the end of a
/page
becomes inaccurate if it is placed at the first line:
- The "Jump" buttons are similarly broken in this case. Trying to jump from editor to brewRenderer will crash the page because it tries to jump to a page number that doesn't exist.
I have this solved - though there may be a more clever way to handle it. |
I think I see a way to do this and keep it all inside of |
@calculuschild should we merge? did you advance in your attempt? |
Please don't merge yet. I was out of town over the weekend and have not implemented yet. If i am right my solution would reduce this PR to ~10 lines. |
I will look at this again and see if I can remember why exactly I duplicated it. |
Description
This PR allows users to apply style, class, and attribute values via the inline
{}
format to the base page for common inheritance.To Do:
Solves #3901
Usage:
Similar to an inline single mustache.
\page{wide,banna=fail,color:black}
*Reviewers, refer to this list when testing features, or suggest new items *
\page
works without values.Copy this list