Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #365 as well as it's duplicates #533 and #542, following the #365 (comment). Here is a short example of how to use it, it works both for segments as well as inline:
Taken from the outline in #365, this PR implements the functionality as follows:
Here is how to make sure this code does not get styled:
Before parse data is nested, we find the stylerignore tags and add a column
stylerignore to the parse data which is false for all token except the
tokens that fall between two stylerignore tags.
After code is turned into nested parse data and spaces and newlines are
computed (must be between terminals, not between any token as currently done with
default_style_guilde_attributes()
edit: Because we need the position of tokens relative to other terminals, not tokens in general when serializing, we must dodefault_style_guilde_attributes()
twice in total now). We store the lag_spaces andlag_newline attributes for all terminal tokens that are marked as
stylerignore in the environment env_current.
We proceed as usual with appyling transformers and flattening out the parse
table.
Right before we serialize the parse table, we replace lag_newlines, lag_spaces
and tokens, text with the initial values for all tokens that were marked as
stylerignore. Then we serialize.