protected override Task <IEnumerable <Common.IDocument> > ExecuteInputAsync(Common.IDocument input, IExecutionContext context) =>
 ProcessHtml.ProcessElementsAsync(
     input,
     context,
     "[href],[src]",
     false,
     (d, c, e, m) =>
 {
     MakeLinkAbsolute(e, "href", context);
     MakeLinkAbsolute(e, "src", context);
 });
Пример #2
0
        protected override async Task <IEnumerable <Common.IDocument> > ExecuteInputAsync(Common.IDocument input, IExecutionContext context)
        {
            // Get the replacement content
            string content = await _content.GetValueAsync(input, context);

            if (content == null)
            {
                return(input.Yield());
            }

            return(await ProcessHtml.ProcessElementsAsync(
                       input,
                       context,
                       _querySelector,
                       _first,
                       (i, c, e, m) => e.Insert(_position, content)));
        }