-
-
Notifications
You must be signed in to change notification settings - Fork 108
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
ConvertTo-Markdown -AsTable processing of some characters seems to prematurely end the table #97
Comments
Can you export a sample rule using Export-Clixml and copy and paste the XML here? I can then import that rule and test. But I'm guessing there is an issue with the apostrophes and/or colons. |
You might need to modify the Width. The default is 80. Try |
I think you need to adjust the output of the command before you convert and/or extend the width. I think that's why you are seeing things cut off. I had to make a number of adjustments to get this to work: get-netfirewallrule | select -first 10 -Property Name,description,enabled,group | Format-List -Group Name -property Description,Enabled,Group | ConvertTo-Markdown -Title "FireWall Rules" -PreContent "This is from the localhost" -width 100 | out-file c:\work\fw.md -Encoding utf8 |
I was able to re-construct your problem. The issue is that the description has returns. And this is only an issue when creating a table I may have to see about changing
to this
|
I might be on to something. If I replace line returns with # My result
| Name | Priority | Description |
| ---- | -------- | ----------- |
| block executable content | 0 | If the message:includes an attachment with executable content Take the following actions:reject the message and include the explanation 'The email contains an attachment that is not allowed' with the status code: '5.7.1' |
| block external forwarding | 1 | If the message:<br> Is sent to 'Outside the organization'<br> And Is message type 'Auto-forward'<br> And Is received from 'Inside the organization'<br> Take the following actions:<br> reject the message and include the explanation 'AutoForward to External Recipients is not allowed' with the status code: '5.7.1' | My result
The first row is my test with the line breaks removed. |
I think I have this working. Copy and save this version of the function. Then test it with your data and let me know. The function has a different name to avoid conflicts.
"@
}
|
Haven't forgotten. Seems to work to produce standard markdown but that doesn't convert neatly using pandoc. I'll keep working on it. Converting the new markdown using pandoc results in tables with a single row |
I got your issues mixed up. From all of my testing this works. Although, if you want to upload a clixml file as I suggested earlier I can test with that. LIke the caption issue, you may need to come up with your own version of this function too create Pandoc-compatible output. |
A new version of this command has been released in v2.33.0 of the module. |
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Complete table.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
This is the output from the convertto-markdown
Take the following actions:
reject the message and include the explanation 'The email contains an attachment that is not allowed' with the status code: '5.7.1'
|
| Block External Forwarding | 1 | If the message:
Is sent to 'Outside the organization'
and Is message type 'Auto-forward'
and Is received from 'Inside the organization'
Take the following actions:
reject the message and include the explanation 'AutoForward to External Recipients is not allowed' with the status code: '5.7.1'
|
| encrypt_external_emails | 2 | If the message:
Is sent to 'Outside the organization'
Take the following actions:
rights protect message with RMS template: 'Encrypt'
|
The text was updated successfully, but these errors were encountered: