Skip to content

Conversation

mizoru
Copy link

@mizoru mizoru commented Sep 2, 2023

Addresses this issue.

Comment on lines +605 to +607

def __repr__(self):
return self.data
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this !

Shouldn't the JSON text representation return something more like Json.dumps(self.data, indent=2) ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IDK how to make that optional for jsonlines or similar; so this is fine as-is imho

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless it could be __str__ instead of __repr__?

Copy link
Contributor

@westurner westurner Sep 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so that repr(Markdown('# h1')) still works, and won't display() default to Markdown.__str__ before Markdown.__repr__?

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

Successfully merging this pull request may close these issues.

3 participants