-
Notifications
You must be signed in to change notification settings - Fork 740
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
New table lexer does not allow for selection of code #1274
Comments
cc @ashmaroli |
I believe this can be easily overcome by CSS: .rouge-line-table .rouge-gutter {
-moz-user-select: none;
-webkit-user-select: none;
user-select: none;
} |
Is there a way to include this in the default configuration? I would honestly be okay inlining this sort of thing. |
Perhaps somewhere around here? Lines 171 to 173 in 73662c9
|
@pyrmont I think the styles above should be inlined only for the |
@ashmaroli If the above rules are inserted regardless of whether the formatter is inserting a table or not, why not also insert rules about line selection? |
@pyrmont There are couple of reasons:
|
@ashmaroli These are good counterarguments. My objection is grounded in the fact that this feels like a breaking change. That said, while I think that's technically true I do acknowledge:
After considering this further, I'd say that I'm OK with the approach proposed. |
Thanks Michael. And I wouldn't consider it a breaking-change. Just enhancing / fixing a very recently released feature. ( It is subjective to how the situation is perceived 😉 ). |
Again, it's somewhat academic given the scope of the changes but I strongly disagree. Using this formatter previously allowed content in the gutter to be selected. Now that functionality is both gone and cannot be enabled as the CSS rules are to be inserted inline and so cannot be overridden. |
Ah! That's true, indeed! |
I have suddenly remembered the reason we used the single-row table approach. While the new table lexer does allow for wrapping of lines, when a user attempts to select code, the line numbers become included in the selection. I'm not sure if there is a way around this, but I would like to look into it sometime in the near future.
The text was updated successfully, but these errors were encountered: