Replace string manipulation with AST logic in parseArgReferenceSection #2318
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uses Goldmark to extract information for docs descriptions from Markdown nodes, specifically:
This PR preserves the logic of tracking a docs path via number of subfields for later lookup, and assigning it a description.
It also attempts to keep all of the docs parsing details of before.
This code is adjusting the
azurerm-sql-firewall-rule
test because it doesn't yet preserve the**NOTE**
inside of an argument description. (Arguably, this NOTE should not actually be part of an argument field - it should exist on its own as part of the Section.)Additionally, H4 headers are now correctly nested under H3 headers. The example for the
TestArgumentRegex/Parses_H3_and_H4_headers_and_their_bullets_as_nested_properties
testis taken from here and it should in fact be nested in the way the new changes reflect. Ultimately for docsgen it doesn't seem to make a difference, but it is nice to see that structures are preserved.
Currently there's a few subheading patterns that aren't carried over to the new parser quite correctly.