Ordered list
sGhadir opened this issue · comments
Bug
Ordered lists from onenote have double spaces after conversion. When looking at the intermediate created doc files, it seems that there is a break after each line. I tried but I have no idea how to solve this. See image:
I have not currently found a way to solve this, and it seems to me that I will have to change all ordered lists to bullet lists before doing the conversion. Is there any way this can be solved so that the lists don't have spaces?
Thanks
sorry, was away a few days. Looking at my past notes that were converted with this script, you are right that there is a newline between ordered-list items. I think this is valid markdown syntax as determined by most markdown linters of various markdown flavors.
EDIT: stale, see next reply
But if you want to remove the extra newline, you will need to use add a regex search and replacement, something like the keepspaces
one here. So, add one mor hashtable under that hashtable:
if ($config['keepspaces']['value'] -eq 1 ) {
@{
description = 'Clear double spaces from ordered lists'
replacements = @(
@{
searchRegex = '\r*\n\r*\n(\s*)[a-zA-Z0-9]+\. '
replacement = "`n`$1- "
}
)
}
}
Let me open a PR with a unit test to see if this works.
please try out my new PR, hope it works for you. If it works, will merge it to master.
Thank you :) I will try it as soon as I get the chance and get back to you.
sure :)
Sorry for my late reply. This works perfectly thank you very much! You just saved me hours of tedious work
glad to help :)