-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Labels
Description
Just a list of issues to remember:
- custom exceptions for specific cases rather than using generic ones,
- recipes for specific tasks (like find all shortcode names in text),
- upgrade RegularParser to not split text into tokens at once but iterate over characters,
- shortcodes with children to represent their structure in text,
- shortcode's
getTextUntilNext()
which returns the content up to the next shortcode opening tag, - shortcode name wildcard,
- more complex positional parameters
[x=http://x.com]
,[x x=http://x.com]
, - shortcode escaping by doubling opening / closing token
[[x /]]
,[[y a=b]]
, - 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
andProcessor::withShortcodeFactory()
(think of a better name) to allow creating custom shortcode objects usingProcessorContext
that are compatible withProcessedShortcode
. This will allow users to put their information inside while still maintaining how library works, - fix inconsistency between
getText
andgetShortcodeText
betweenParsedShortcode
andProcessedShortcode
, - 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 oflist
(item
shortcodes) receive context from data passed tolist
, - better documentation than it is now in README (Improved README #34),
- 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(events FTW),Processor::process()
return value using array of replacements - 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
incomposer.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:
-
(needsDeclareHandler
should typehint interface in constructor,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.