-
Notifications
You must be signed in to change notification settings - Fork 7
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
T6342: add parsing of docs element #32
base: current
Are you sure you want to change the base?
Conversation
in | ||
match x with | ||
| Xml.Element ("docs", _, children) -> | ||
List.fold_left aux d children | ||
| _ -> d |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in | |
match x with | |
| Xml.Element ("docs", _, children) -> | |
List.fold_left aux d children | |
| _ -> d | |
in Xml.fold aux d x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Granted the documentation on Xml-light is sparse (contained in its .mli files), but Xml.fold will do the left fold over children and avoid the redundancy above.
usageExample: string; | ||
hints: doc_hints list; | ||
} [@@deriving yojson] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have not adopted strict formatting yet, but for the moment, I'd suggest consistency in the file: 4 space indent; closing brace aligned with start of definition.
usageExample: string; | ||
hints: doc_hints list; | ||
} [@@deriving to_yojson] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting, as mentioned above.
Looks good, Robert; suggestions above. Also, you may want to check for trailing whitespace on several lines. |
Change Summary
Add support to parse
<docs>
elements from xmlTypes of changes
Related Task(s)
Related PR(s)
vyos/vyos-1x#4292
Proposed changes
How to test
Checklist: