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

Preview: Initial attempt at github-flavored markdown output #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

philtweir
Copy link

This is an initial attempt at Github-flavored markdown output - I have marked it preview as I know it needs changes before merge, but keen to get your thoughts the below @sctweedie .

Limitations

  • currently, it uses LaTeX for colour (as Github does not provide another way)
  • as such, since the colorama approach doesn't quite match the formatting sequence for LaTex, it is a bit messy between abstracting the "bracketing" using a ColorMapper class, and inlining it in the markdown outputter - I think there's maybe a hidden fuller-featured Formatter superclass to contain the logic
  • Nothing for 3-way diffs
  • I haven't tracked through the branches to ensure we cover all features, but it should have most of them
  • The underscore escaping is a pain, but is required to prevent Github rejecting any text inside LaTeX bounds

Really, I'd like to do this with the assumption spans are available, so we can skip the LaTeX formatting, and then pandoc can happily output HTML, etc. (but that does mean that the JOB_SUMMARY for Github actions will not format colour correctly) -- alternatively, using other forms of styling than colour (bold, italic, strikethrough) should work more cleanly.

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.

None yet

1 participant