-
Notifications
You must be signed in to change notification settings - Fork 148
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
Copy As Html 2022: BeforeCodeSnippet and AfterCodeSnippet options not being honored #252
Comments
One weird thing I'm noticing is that the copy as html assembly is loaded twice: @olegtk any idea why that is? Also it feels like changes to the Copy HTML page in Tools Options have no effect. When reading the values here, we get the default values:
|
Yup, the extension reads the |
@olegtk back to you, the problem is with having two copies of the assembly loaded (regular and 2022) |
@olegtk @KirillOsenkov Has this been fixed in 2022? I just re-installed the latest and it appears that none of the options are being honored. We have been using a custom BeforeCodeSnippet for years to adjust the font size for code pasted into OneNote and not being able to set the to our previous setting is quite frustrating. Was there some way to get this to work properly? I'm also noticing that the pasted output is not properly inserting line breaks for lines ending with comments. This results in the next line of code appearing on the same line as the previous. I think this is because the "ReplaceLineBreaksWithBR" option is not being honored and OneNote requires it to format |
I'm having this problem as well. Is there a workaround or update for this? |
Copy As Html is an important function for us to make PowerPoint or documents. Now we can only copy the VS code to VSC to achieve the effect similar to Copy As Html. Hopes it can be repaired as soon as possible. |
Simplest thing I've found is to open VS 2019 and use Copy As Html there. It works and appears to honor settings correctly. |
That's what I'm currently doing, but it's also the only reason I have for keeping VS 2019 around. That's not a sustainable solution, as support of that is going to run out. Likewise, sooner or later, there will be language features that aren't supported in VS 2019, so that opening a solution in that version may no longer work. |
Hi, I just pushed a version 17.0.2 to https://marketplace.visualstudio.com/items?itemName=VisualStudioPlatformTeam.CopyAsHtml2022 fixing this issue. The copy operation also now honors "Use accurate classifier' option in Text Editor -> Advanced settings so that copied text includes correct colors in code files. Thanks, |
Casual testing seems to indicate that it now works for my use case. I'll write again if I discover any issues. Thank you. |
I have modified HTML Copy options (under Tools > Options > Productive Power Tools > HTML Copy) adding BeforeCodeSnippet and AfterCodeSnippet. It doesn't seem to honor these.
BeforeCodeSnippt,
AfterCodeSnippet,
When I do Copy Html Markup on following,
The output,
It's missing the wrapper.
Environment Information:
The text was updated successfully, but these errors were encountered: