Open jaliyaudagedara opened 3 years ago
@Kirillosenkov
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: https://github.com/microsoft/VS-PPT/blob/ee92b43da16d78a1f0e7b117f5a8c24a1704d581/src/CopyAsHtml/CopyAsHtml/HtmlMarkupProvider.cs#L38
Yup, the extension reads the ToolsOptionsPage.Instance
from the CopyAsHtml
assembly, but the tools options page edits the ToolsOptionsPage.Instance
from the CopyAsHtml2022
assembly.
@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 pre
blocks properly?
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.
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, Bertan
Casual testing seems to indicate that it now works for my use case. I'll write again if I discover any issues. Thank you.
Looks good to me.
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: