Skip to content

Highlighted code snippets copy with extra newlines #440

@ramirezfranciscof

Description

@ramirezfranciscof

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.

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