Skip to content

Passing a diff directly rather than two files #17

Description

@pawamoy

Hey Will 👋 Very cool widget for Textual!

I was wondering how much effort it would be to support passing diffs directly to this widget, rather than two files. In short, I'm computing diffs myself, so I got a string like the following that I would like to pass to the widget:

--- a/docs/examples/workflows/upstream/scripts_python.md
+++ b/docs/examples/workflows/upstream/scripts_python.md
@@ -4,9 +4,6 @@
 
 This example is a replication of an Argo Workflow example in Hera.
 The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/scripts-python.yaml).
-
-
-
 
 === "Hera"
 
@@ -89,4 +86,3 @@
               - name: message
                  value: '{{steps.generate.outputs.result}}'
     ```
-

If that's too complicated a feature, don't worry I can probably refactor my algorithm to avoid pre-computing diffs and do things on-the-fly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions