Closed 1001QAdotNET closed 3 years ago
I can't really see it correctly, if I copy/paste the snippet you have, it's just one big line of text. If I pull it into N++ and format it as XML then copy to OneNote it works just fine. I suspect there's a newline in there but not a proper line break tag. That's one of the weird cases where OneNote takes over and OneMore doesn't necessarily have much control (remember we struggled with this same kind of issue in another ticket)
So my suggestion is to make sure there are no soft-break (Shift-Enter) and if there are then replace them with hard-breaks (Enter)
I'm guessing your plugin is inserting into the CDATA by your own plugin? I can't presume to replace newlines with BR tags or split them across separate OE elements because that won't always be correct. So make sure your plugin does what it can to format the input so OneNote can maintain it properly.
No that is copy and pasted text I managed to get my plugin working with python Trying the XML next
Try this one
<one:Page xmlns:one="http://schemas.microsoft.com/office/onenote/2013/onenote" ID="{xxxxxxxxxxxxxxxx}" name="XML Colorizer" dateTime="2020-12-16T22:57:04.000Z" lastModifiedTime="2020-12-16T22:58:29.000Z" pageLevel="1" isCurrentlyViewed="true" selected="partial" lang="yo">
<one:QuickStyleDef index="0" name="PageTitle" fontColor="automatic" highlightColor="automatic" font="Calibri Light" fontSize="20.0" spaceBefore="0.0" spaceAfter="0.0" />
<one:QuickStyleDef index="1" name="p" fontColor="automatic" highlightColor="automatic" font="Calibri" fontSize="11.0" spaceBefore="0.0" spaceAfter="0.0" />
<one:PageSettings RTL="false" color="automatic">
<one:PageSize>
<one:Automatic />
</one:PageSize>
<one:RuleLines visible="false" />
</one:PageSettings>
<one:Title lang="en-US">
<one:OE alignment="left" quickStyleIndex="0">
<one:T><![CDATA[XML Colorizer]]></one:T>
</one:OE>
</one:Title>
<one:Outline selected="partial">
<one:Position x="36.0" y="86.4000015258789" z="0" />
<one:Size width="540.0" height="107.4217224121094" />
<one:OEChildren selected="partial">
<one:OE alignment="left" quickStyleIndex="1">
<one:T><![CDATA[<?xml version="1.0"?> <br>
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <br>
<capabilities> <br>
<capability>urn:ietf:params:xml:ns:netconf:base:1.0</capability> <br>
</capabilities> <br>
</hello>]]>]]>]]></one:T>
</one:OE>
<one:OE alignment="left" quickStyleIndex="1" lang="en-US">
<one:T><![CDATA[]]></one:T>
</one:OE>
<one:OE alignment="left" quickStyleIndex="1" selected="partial" lang="en-US">
<one:T selected="all"><![CDATA[]]></one:T>
</one:OE>
</one:OEChildren>
</one:Outline>
</one:Page>
got it. OK I'll see what I can do.
Good catch, thanks. Will be in the next release
this is how close I can get
Need I need to eliminate the line breaks and the quotes probably pygments has a switch for that as it was the case for the
Done; I guess I won't use it after you finish the integrated one Going forward if any other language is needed I guess I can easily complement what you wrote
Works nnow, your color scheme is better , thank you
Describe the bug The colorizer for XML and HTML breaks the lines
To Reproduce try to apply the XML colorizer to this code
see the picture
Expected behavior the tags
<capability>
should stay at the beginning of the lineScreenshots