Guest User

Untitled

a guest
Feb 24th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. let
  2. nl = "#(cr)#(lf)",
  3. code = nl&"```"&nl,
  4. doc = Value.Metadata(Value.Type(SqlExpression.SchemaFrom)),
  5. combine = {"# " & doc[Documentation.Name]
  6. , doc[Documentation.Description]
  7. , "# Descrition "
  8. , doc[Documentation.LongDescription]
  9. , "# Category "
  10. , doc[Documentation.Category]
  11. , if List.Count(doc[Documentation.Examples])>0 then "# Examples " else ""
  12. ,Lines.ToText(
  13. List.Transform(doc[Documentation.Examples],
  14. each "> "&_[Description]&code
  15. &_[Code]&code
  16. &"> "&_[Result])
  17. , nl&"***"&nl)
  18. },
  19. out = Lines.ToText(combine, nl)
  20. in
  21. out
Add Comment
Please, Sign In to add comment