Closed jbruett closed 6 years ago
It's known bug in this version.
Corrected in the dev branch on GitHub - the commit https://github.com/iainbrighton/PScribo/commit/9ab6fafeeaf259c53318d840fe5e4543115f4c23. I've tested it - please check https://github.com/equelin/Format-Pester/issues/36.
The newer version is not published to PowerShell Gallery yet.
@jbruett How many Section
levels do you have in your document? If you have have 5 (or more) nested Section
definitions you will receive this warning as the Document
root is section number 1!
For example, you won't receive the warning with the following document:
Document Level1 {
Section Level2 {
Section Level3 {
Section Level4 {
Section Level5 { }
}
}
}
} | Export-Document -Format Html
However, if you add another nested Section
inside of Level5, you will get a warning. Make sense?
absolutely makes sense, could you change the wording of the error in that case? The error made me think that the error had to do with Style parameter value not the Section levels. instead of making this something to do with HTML5 why not indicate that the error is being generated by the document depth. Then if someone uses Heading6 as a value for Style you could throw a non-terminating error/warning about that similar to what I received above?
@jbruett - is this warning more descriptive Html5 supports a maximum of 5 heading levels. Reduce the number of nested Document sections to remove the unsupported tags in the Html output.
?
So I guess I still don't completely understand the issue. HTML5 allows for H1-H6 tags, which I should be able to anywhere to dictate the structure of the document (logically ordered of course). If the issue is that PScribo is using H1 at the Document level and therefor can only support 5 nested subsections, then this is a limitation of the way that PScribo implements the document structure, and not a limitation of HTML5 as dictated by the error message. To me, the PScribo Document is the equivalent of the HTML Body and Headers are specific to content, allowing for a 6-tier heirarchy. This could also allow for addition sections ahead of the Navigation/TOC. I haven't directly familiarized myself with the way that PScribo connects to the HTML output, but if my above assumptions/interpretations are correct i think that this might be a better message. *PScribo supports up to 5 nested sections, looks like you may have more. See this link for more info:
I keep receiving warnings about HTML5 Heading support.
WARNING: [ 11:52:17:768 ] [ Html ] - Html5 supports a maximum of 5 heading levels.
I don't have any headers higher than 5 (Header5) in my document.
Running PScribo 0.7.17.75