aiidateam / aiida-tutorials

AiiDA tutorials web site
http://aiida-tutorials.readthedocs.org
20 stars 37 forks source link

Highlighted code snippets copy with extra newlines #440

Open ramirezfranciscof opened 1 year ago

ramirezfranciscof commented 1 year ago

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.