Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Highlighted code snippets copy with extra newlines #440

Open
ramirezfranciscof opened this issue Sep 30, 2022 · 0 comments
Open

Highlighted code snippets copy with extra newlines #440

ramirezfranciscof opened this issue Sep 30, 2022 · 0 comments

Comments

@ramirezfranciscof
Copy link
Member

For example, if you go to this snippet and use the copy function of the code box, you get the following:

from aiida.orm import Int
from aiida.engine import WorkChain


class OutputInputWorkChain(WorkChain):
    """Toy WorkChain that simply passes the input as an output."""

    @classmethod
    def define(cls, spec):
        """Specify inputs, outputs, and the workchain outline."""
        super().define(spec)

        spec.input("x", valid_type=Int)
        spec.outline(cls.result)
        spec.output("workchain_result", valid_type=Int)


    def result(self):

        """Pass the input as an output."""



        # Declaring the output

        self.out("workchain_result", self.inputs.x)

Not sure if this is an issue of how we have it set up, or of the underlying library we are using for the rendering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant