You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In addition to the installable plugins (#3), fabric must have built-in plugins to allow generation of simple content without the need to download extra components.
content.text plugin is be a part of the fabric binary.
Specification
the plugin has no configuration options
API interface:
local context object
required text string attribute
optional format_as enum string attribute with allowed values title, code and blockquote (nil by default)
optional absolute_title_size int attribute (nil by default)
optional code_language string attribute
Behavior
The plugin renders and returns a text value as a template string using local context as input data and formats it in Markdown according to format_as parameter (if provided).
If format_as set to code, the text is formatted with triple backticks. If code_language is provided, the language should be set after the first triple backtick.
If format_as is title and absolute_title_size is set, the Markdown title size is absolute_title_size * #
If format_as is title and absolute_title_size is not set, the relative title size is calculated from the local context object that contains a document body (issue TBD) -- the multiplier for # for a Markdown title prefix is the number of title text seen previously in the document
Deliverables
new built-in content.text plugin
unit test for the plugin
The text was updated successfully, but these errors were encountered:
Background
In addition to the installable plugins (#3),
fabric
must have built-in plugins to allow generation of simple content without the need to download extra components.Related: #13, #18
Design
content.text
plugin is be a part of thefabric
binary.Specification
text
string attributeformat_as
enum string attribute with allowed valuestitle
,code
andblockquote
(nil by default)absolute_title_size
int attribute (nil by default)code_language
string attributeBehavior
The plugin renders and returns a
text
value as a template string using local context as input data and formats it in Markdown according toformat_as
parameter (if provided).If
format_as
set tocode
, the text is formatted with triple backticks. Ifcode_language
is provided, the language should be set after the first triple backtick.If
format_as
istitle
andabsolute_title_size
is set, the Markdown title size isabsolute_title_size
*#
If
format_as
istitle
andabsolute_title_size
is not set, the relative title size is calculated from the local context object that contains a document body (issue TBD) -- the multiplier for#
for a Markdown title prefix is the number oftitle
text seen previously in the documentDeliverables
content.text
pluginThe text was updated successfully, but these errors were encountered: