def prepare_refer_workflow()

in src/pydolphinscheduler/core/yaml_workflow.py [0:0]


    def prepare_refer_workflow(self, content):
        """Allow YAML files to reference workflow derived from other YAML files."""
        workflow_paths = re.findall(r"\$WORKFLOW\{\"(.*?)\"\}", content)
        for workflow_path in workflow_paths:
            logger.info(
                f"find special token {workflow_path}, load workflow form {workflow_path}"
            )
            possible_path = ParseTool.get_possible_path(
                workflow_path, self._base_folder
            )
            workflow_name = YamlWorkflow.parse(possible_path)
            content = content.replace(f'$WORKFLOW{{"{workflow_path}"}}', workflow_name)

        return content