-
Notifications
You must be signed in to change notification settings - Fork 58
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
Document doc string formatter in def, defn, ... #36
Comments
The docstring formatter is used only to print documentation by the doc function - otherwise, docstrings are stored as written. |
At around the time of the last comment, I think the code for I think it does more now though. IIUC, this PR and subsequent development made constructs from Markdown (e.g. lists and code blocks) mean something within docstrings. Investigation so far suggests to me that the docstring is parsed into a stack of tuples / arrays (which represent "blocks", which can in some cases be nested) and these are then re-emitted in the form of a buffer, accounting for markup (bold, code, italic, underline), indentation, width, and color settings. There appears to be specific handling for ordered / unordered lists as well as code blocks (fenced and indented may be). Update: The Formatting with Markdown section does describe some (most/all?) of the supported constructs. |
https://janet-lang.org/docs/bindings.html and https://janet-lang.org/docs/functions.html don't explain how multiline doc strings are formatted by doc string formatter.
The text was updated successfully, but these errors were encountered: