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
tools for text analysis (nesting depth, count, name stats, etc.)
configurable shortcode name validation rules,
solve BBCode ambiguity issues in [x=] and [x= arg=val],
add ProcessedShortcodeInterface and Processor::withShortcodeFactory() (think of a better name) to allow creating custom shortcode objects using ProcessorContext that are compatible with ProcessedShortcode. This will allow users to put their information inside while still maintaining how library works,
fix inconsistency between getText and getShortcodeText between ParsedShortcode and ProcessedShortcode,
make ShortcodeFacade a mutable class with all the shortcuts to ease library usage (Improved facade #36),
new regex parser that catches only opening/closing tags and handles nesting manually,
repeated shortcodes, ie. ability to repeat inner content with collections of data, [list]- [item/],[/list] which renders multiple "item" elements, children of list (item shortcodes) receive context from data passed to list,
extract several event listener classes with __invoke() to ease events usage (Builtin handlers #33),
find a way to strip content outside shortcodes in given shortcode content without losing tree structure (apply results event),
configurable handler for producing Processor::process() return value using array of replacements (events FTW),
issue with losing shortcode parent when many same shortcodes are on the same level,
HUGE BC (just an idea, no worries): Change ProcessorInterface::process() to receive array of parsed shortcodes to allow greater flexibility (eg. filtering by parent),
find a way to retrieve original shortcode content even when auto-processing,
prevent the ability to create shortcode with falsy name (require non-empty string value),
resolve naming problem for shortcode parameters (current) vs. arguments,
suggest symfony/yaml in composer.json for YAML serializer,
allow escaping with double open/close tags like in WordPress ([[code]value[/code]]),
add Wordpress parser (regex parser with code from WP).
Regular parser:
fix BBCode parsing (unused variable).
BBCode:
decide whether bbcode value should be:
merged with parameters as parameter with shortcode name, no API change, easier version,
a separate element, fourth parameter in Shortcode constructor, and separate getter,
a separate shortcode type (requires changes in both Parsed and Processed as well).
Built-in handlers:
DeclareHandler should typehint interface in constructor, (needs add() method)
EmailHandler could be a BBCode,
PlaceholderHandler should have configurable placeholder braces,
UrlHandler could be a BBCode,
WrapHandler could have several most common variants (eg. bold) created as named constructors.
Just a list of issues to remember:
getTextUntilNext()which returns the content up to the next shortcode opening tag,[x=http://x.com],[x x=http://x.com],[[x /]],[[y a=b]],[x=]and[x= arg=val],ProcessedShortcodeInterfaceandProcessor::withShortcodeFactory()(think of a better name) to allow creating custom shortcode objects usingProcessorContextthat are compatible withProcessedShortcode. This will allow users to put their information inside while still maintaining how library works,getTextandgetShortcodeTextbetweenParsedShortcodeandProcessedShortcode,ShortcodeFacadea mutable class with all the shortcuts to ease library usage (Improved facade #36),[list]- [item/],[/list]which renders multiple "item" elements, children oflist(itemshortcodes) receive context from data passed tolist,__invoke()to ease events usage (Builtin handlers #33),configurable handler for producing(events FTW),Processor::process()return value using array of replacementsHUGE BC (just an idea, no worries): Change,ProcessorInterface::process()to receive array of parsed shortcodes to allow greater flexibility (eg. filtering by parent)symfony/yamlincomposer.jsonfor YAML serializer,[[code]value[/code]]),Regular parser:
BBCode:
Shortcodeconstructor, and separate getter,Built-in handlers:
(needsDeclareHandlershould typehint interface in constructor,add()method)EmailHandlercould be a BBCode,PlaceholderHandlershould have configurable placeholder braces,UrlHandlercould be a BBCode,WrapHandlercould have several most common variants (eg. bold) created as named constructors.