Releases: kelko/html-streaming-editor
v0.8.0
v0.7.1
0.7.1 Features
-
Support CRLF Newline
Additionally to simple space, tab and Unix new line (\n) also support Windows new line (\r\n) wherever whitespaces are supported
0.7 Features
-
Implement "Append" & "Prepend" instead of "Add" for element processing
-
The following commands have been removed:
ADD-ELEMENTADD-COMMENTADD-TEXT-CONTENT
-
Instead there are following, new commands:
APPEND-ELEMENT: same behaviour as previousADD-ELEMENTAPPEND-COMMENT: same behaviour as previousADD-COMMENTAPPEND-TEXT-CONTENT: same behaviour as previousADD-TEXT-CONTENTPREPEND-ELEMENT: similar toAPPEND-ELEMENT, but new element is
added as first childPREPEND-COMMENT: similar toAPPEND-COMMENT, but new comment is
added as first childPREPEND-TEXT-CONTENT: similar toAPPEND-TEXT-CONTENT, but new text
content is added as first child
-
-
Add support for DOCTYPE
If a
<!DOCTYPE >tag is present in the input it will be kept and
written into the output, unlessEXTRACT-ELEMENTis used to return only
parts.⚠️ KNOWN ISSUE⚠️
If present any DOCTYPE will be interpreted as HTML5. Originates in
underlying lib. -
Add support to read pipeline definition from file
instead of passing the pipeline as parameter a file-named, prefixed by '@', can passed.
The rest of the parameter will be interpreted as filename and opened to read the pipeline definition from there. -
Allow for more whitespaces around pipe symbol
multi-line pipeline definitions now possible
0.7 Bug Fixes
- Fix bug with SET-TEXT-CONTENT: couldn't GET-TEXT-CONTENT while SET-TEXT-CONTENT on same element
Full Changelog: 0.6.0...0.7.1
v0.7.0
Features
-
Implement "Append" & "Prepend" instead of "Add" for element processing
-
The following commands have been removed:
ADD-ELEMENTADD-COMMENTADD-TEXT-CONTENT
-
Instead there are following, new commands:
APPEND-ELEMENT: same behaviour as previousADD-ELEMENTAPPEND-COMMENT: same behaviour as previousADD-COMMENTAPPEND-TEXT-CONTENT: same behaviour as previousADD-TEXT-CONTENTPREPEND-ELEMENT: similar toAPPEND-ELEMENT, but new element is
added as first childPREPEND-COMMENT: similar toAPPEND-COMMENT, but new comment is
added as first childPREPEND-TEXT-CONTENT: similar toAPPEND-TEXT-CONTENT, but new text
content is added as first child
-
-
Add support for DOCTYPE
If a
<!DOCTYPE >tag is present in the input it will be kept and
written into the output, unlessEXTRACT-ELEMENTis used to return only
parts.⚠️ KNOWN ISSUE⚠️
If present any DOCTYPE will be interpreted as HTML5. Originates in
underlying lib. -
Add support to read pipeline definition from file
instead of passing the pipeline as parameter a file-named, prefixed by '@', can passed.
The rest of the parameter will be interpreted as filename and opened to read the pipeline definition from there. -
Allow for more whitespaces around pipe symbol
multi-line pipeline definitions now possible
Bug Fixes
- Fix bug with SET-TEXT-CONTENT: couldn't GET-TEXT-CONTENT while SET-TEXT-CONTENT on same element
Full Changelog: 0.6.0...0.7.0
v0.6.0
add commands for value processing inside string-value creating pipelines:
REGEX-REPLACE: Replace all string content matching a given regular expression with the given replacement (can use groups)TO-UPPER: upper-case all textTO-LOWER: lower-case all textADD-PREFIX: add a string prefix before the textADD-SUFFIX: add a string suffix after the text
BREAKING CHANGES:
- Rename
REPLACEtoREPLACE-ELEMENT(aliasMAPis kept)
Full Changelog: 0.5.0...0.6.0
v0.5.0
For all commands creating textual content (SET-TEXT-CONTENT, ADD-TEXT-CONTENT, ADD-COMMENT, SET-ATTR) instead of only passing a pre-defined string value now also sub-pipelines can be used to read that string value from some place. E.g. read it from a (different) attribute of a (different) element or read the text content.
-
first step of such sub-pipeline always selects element to read the value from
USE-ELEMENT: take the target element and run value extraction on thatUSE-PARENT: take the parent of the target element and run value extraction on thatQUERY-ELEMENT: run a CSS selector query on the target element and run value extraction on all matchesQUERY-PARENT: run a CSS selector query on the parent of the target element and run value extraction on all matchesQUERY-ROOT: run a CSS selector query on the root of the target element and run value extraction on all matches
-
second step of such sub-pipeline always defines which value to read from selected element (attr, text-content)
GET-ATTR: read an attribute of the selected elementGET-TEXT-CONTENT: read the textContent of the selected element
-
future additions:
- value-manipulating steps will be possible (up-casing, down-casing, regex-based replace)
- maybe: a "quote"-like command to read text content from a file
also:
-
new command "QUERY-REPLACED", usable in sub-pipelines for
REPLACEallows to query the soon-to-be-replaced element, e.g. to extract sub-nodes
BREAKING CHANGES:
- Rename
ONLYtoEXTRACT-ELEMENT(kept old name as alias, old alias is removed) - Rename
WITHOUTtoREMOVE-ELEMENT(kept old name as alias, old alias is removed) - Renamed alias
FORtoWITHforFOR-EACH - Renamed
READ-FROMtoLOAD-FILE
Full Changelog: 0.4.2...0.5.0
v0.4.0
v0.3.1
v0.3.0
v0.2.0
v0.0.8
new commands:
SET-ATTR{attr_name ↤ 'string value}: sets or adds a given attributeSET-TEXT-CONTENT{'string value'}: remove all children of an element and replaces it with a new text content childADD-TEXT-CONTENT{'string value'}: adds a new text content childADD-COMMENT{'string value'}: adds a new comment child