Skip to content
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.

Display issues - HTML to Markdown #3

Open
4 tasks
teamshortcut opened this issue Jul 3, 2018 · 0 comments
Open
4 tasks

Display issues - HTML to Markdown #3

teamshortcut opened this issue Jul 3, 2018 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@teamshortcut
Copy link
Member

teamshortcut commented Jul 3, 2018

  • Images
  • Subscripts/superscripts
  • ol and ul
  • Tables

Images

eg. https://www.kcl.ac.uk/mathsschool/weekly-maths-challenge/previouschallenges.aspx Challenge 18

Subscripts/superscripts

For example, x squared would simply be displayed as x2
Unicode superscript characters:
⁰¹²³⁴⁵⁶⁷⁸⁹
Unicode subscript characters:
₀₁₂₃₄₅₆₇₈₉

https://en.wikipedia.org/wiki/Superscripts_and_Subscripts
https://www.fileformat.info/info/unicode/block/superscripts_and_subscripts/list.htm

Could check to see if subscript/superscript character exists in Unicode, rather than manually checking for certain ones. This would allow characters like +⁺₊ to be added without manually filtering, useful for recursive relations or indices problems. Kings Maths School website seems to use <sup> and <sub> currently.

Some flavours of markdown (though not necessarily Discord, and seemingly not GitHub) seem to support superscript with ^ and subscript with ~. eg. x^2 and x~1

ol and ul

eg. https://www.kcl.ac.uk/mathsschool/weekly-maths-challenge/challenges-81-100.aspx Challenge 81. Because the list elements are children, the code does not catch them. (since it uses .next_sibling and .contents)

Tables

eg. https://www.kcl.ac.uk/mathsschool/weekly-maths-challenge/previouschallenges.aspx Challenge 5


A general HTML -> Markdown solution would be helpful; something like this might be helpful https://pypi.org/project/pypandoc/.

@teamshortcut teamshortcut added bug Something isn't working help wanted Extra attention is needed labels Jul 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working help wanted Extra attention is needed
Development

No branches or pull requests

1 participant