Ready to make the step to Markdown and saying farewell to your OneNote, EverNote or whatever proprietary note taking tool you are using? Nothing beats clear text, right? Read on!
GNU General Public License v3.0
196
stars
113
forks
source link
subpages with identical names but in different parents overwrite each other #23
OneNote subpages are not correctly handled in the scenario with two subpages with the same name but belonging to different parents. The created word documents have the same name, hence the latter one overwrites the earlier one.
Example
Parentpage01
SubpageA
Parentpage02
SubpageA
This will result in a single SubpageA.docx word document, where the latter one has overwritten the earlier one.
Fix
I think the bug would be fixed by adding the second statement
@FrankEppink you were absolutely right. Corrected the script to your recommendations. Thanks a lot for making this somewhat better. If you agree with the commit please close the issue.
Problem
OneNote subpages are not correctly handled in the scenario with two subpages with the same name but belonging to different parents. The created word documents have the same name, hence the latter one overwrites the earlier one.
Example
This will result in a single SubpageA.docx word document, where the latter one has overwritten the earlier one.
Fix
I think the bug would be fixed by adding the second statement
after https://github.com/SjoerdV/ConvertOneNote2MarkDown/blob/master/ConvertOneNote2MarkDown.ps1#L118
so that the line
in https://github.com/SjoerdV/ConvertOneNote2MarkDown/blob/master/ConvertOneNote2MarkDown.ps1#L122
actually uses the correct and unique name including the pagename.
also the earlier check in https://github.com/SjoerdV/ConvertOneNote2MarkDown/blob/master/ConvertOneNote2MarkDown.ps1#L65 should be moved lower into line 120 to check the actual word file path.