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

GitHub markdown for lists displays incorrectly #108

Closed
lhriley opened this issue Jan 31, 2017 · 2 comments
Closed

GitHub markdown for lists displays incorrectly #108

lhriley opened this issue Jan 31, 2017 · 2 comments

Comments

@lhriley
Copy link

lhriley commented Jan 31, 2017

I noticed that when creating a list, the preview in Remarkable when using the Github (Default) style does not match the Github Markdown Styleguide. This applies to ordered, unordered, and mixed order lists.

Remarkable version 1.87
Linux Mint 18.1

This works in Github:

Example 1:

  • Dashes work just as well
  • And if you have sub points, put two spaces before the dash or star:
    • Like this
    • And this

Example 2:

  1. line 1
  2. line 2
    1. line 2.1
  3. line 3
    • line 3.*

However renders like this in Remarkable:

Example 1:

  • Dashes work just as well
  • And if you have sub points, put two spaces before the dash or star:
  • Like this
  • And this

Example 2:

  • line 1
  • line 2
  • line 2.1
  • line 3
  • line 3.*

Markup:

Example 1:

- Dashes work just as well
- And if you have sub points, put two spaces before the dash or star:
  - Like this
  - And this

Example 2:

1. line 1
2. line 2
   1. line 2.1
3. line 3
   * line 3.*
@vphantom
Copy link

I played with this bug, and it appears that Remarkable expects 4 spaces per indent level, whereas GitHub only needs 2 spaces.

@vphantom
Copy link

vphantom commented Feb 23, 2017

According to python-markdown #451, the Markdown standard specifies 4 spaces and GitHub is breaching it with its 2 spaces. We must set tab_length to 2 instead of the default 4 when in GitHub mode to work around this.

Seems to me like self.default_extensions in remarkable/RemarkableWindow.py should conditionally contain tab_length=2 if self.style=="github". Problem is, this would mean re-initializing markdown whenever the CSS is changed, which is non trivial. I'm not a Python programmer so I guess this is where I must stop my effort.

@jamiemcg jamiemcg closed this as completed Jan 6, 2018
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

No branches or pull requests

3 participants