Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Support Internal Embeds #270

Merged
merged 5 commits into from
Apr 25, 2019
Merged

Support Internal Embeds #270

merged 5 commits into from
Apr 25, 2019

Commits on Apr 17, 2019

  1. feat(embeds): detect internal embeds

    So far only the detection of local embeds has been implemented. As this requires access to some additional properties, many tests are broken for the time being
    
    See #267
    trieloff committed Apr 17, 2019
    Configuration menu
    Copy the full SHA
    7af9356 View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2019

  1. test(embeds): fix unit and integration tests for internal embeds

    The internal embed handler now requires access to some additional request properties that were not
    mocked in all test cases
    
    for #267
    trieloff committed Apr 18, 2019
    Configuration menu
    Copy the full SHA
    8ceef49 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    73cb0fc View commit details
    Browse the repository at this point in the history
  3. feat(transformer): enable recursive processing in custom handler func…

    …tions
    
    The VDOMTransformer's `handler` functions did not allow for recursive processing of child nodes so
    far, i.e. when a handler function wanted to process only a single MDAST node, but hand the
    processing of all MDAST child nodes back to the original transformer, it had no way of doing so,
    making each `handler` function a terminal node. With this change, the signature of `handler`
    functions changes to `handler(callback, node, parent, handlechild)` where `handlechild(callback,
    childnode, mdastparent, hastparent)` is a callback itself that takes the current HTAST-constructing
    `callback`, the MDAST `childnode` that should get transformed, the `mdastparent`, i.e. the current
    node from the vantage point of the `handler` function, and with `hastparent` a HAST parent node that
    the output of the child processing will be attached to.
    trieloff committed Apr 18, 2019
    Configuration menu
    Copy the full SHA
    0d5193a View commit details
    Browse the repository at this point in the history
  4. fix(embed): provide fallback with esi:remove when esi include fails

    Until now, a failed ESI include would fail silently, without a possible fallback. This change falls
    back to the markdown rendered as HTML in case the ESI does not work, giving at least an
    approximation of the content created.
    
    fixes #267
    trieloff committed Apr 18, 2019
    Configuration menu
    Copy the full SHA
    575391d View commit details
    Browse the repository at this point in the history