Module lua.nd.section
Represent a section in the header of a note.
This makes some assumptions about how you use titles in headers.
Functions
Section:new (opts) | Instantiate a new section. |
Section:from_header (title, header) | Create a new section from a title and the total header. |
Section:all_from_header (header) | Find and extract all sections from a header Very opinionated. |
Functions
- Section:new (opts)
-
Instantiate a new section.
Parameters:
- opts table: A table of options
Returns:
-
Section: A new section object
- Section:from_header (title, header)
-
Create a new section from a title and the total header.
Parameters:
- title string: The title of the section to extract
- header string: The header to extract from
Returns:
-
Section: A new section object
- Section:all_from_header (header)
-
Find and extract all sections from a header
Very opinionated.
Parameters:
- header string: The header to parse
Returns:
-
table: A list of Section objects