Simplenote-electron: remove markdown syntax from sidebar list

Created on 5 Apr 2016  路  10Comments  路  Source: Automattic/simplenote-electron

Show only the first + second line of the note without the markdown syntax. Maybe you can display an icon to indicate if markdown is enabled instead.

enhancement

Most helpful comment

I would also prefer the markdown syntax to go away in the list, as it is only used to indicate a title, which to me is useful in the content area, but not in the notes list.

The web version is not consistent with the desktop version with that regard: in the web version, the markdown syntax is removed (as I would prefer), in the desktop version (Windows), it is not.

All 10 comments

You can already adjust the amount of lines shown. So, you are suggesting to remove the MD syntax in the note list? Can you elaborate why you'd want this?

@drw158 I think what he is saying is that if you have a note with markdown enabled it still shows the syntax in the list on the left (vs the content post formatting). The preferred behavior would be to not see the markdown in the preview in the list. (screenshot attached).

screenshot from 2016-04-10 21-21-57

^ that is with preview enabled.

@ryanleesipes thanks, that's exactly what I meant.

Interesting, I didn't think about that. It doesn't bother me.

I would also prefer the markdown syntax to go away in the list, as it is only used to indicate a title, which to me is useful in the content area, but not in the notes list.

The web version is not consistent with the desktop version with that regard: in the web version, the markdown syntax is removed (as I would prefer), in the desktop version (Windows), it is not.

I would also like this enhancement. I would be happy to help with a PR. Do you know off-hand where to start looking at this?

@dangerginger we would welcome your contributions! it looks like you can find this in the note display mixin

if you need any help getting started with this, please feel free to ping me here. as a quick tip, I find running it in Docker to be useful so that versions are proper and global state on my computer doesn't get mangled

docker-compose up install # will install the node modules with the right node version
docker-compose up dev # will start a local server

After that you can open up electron with electron . or open Chrome to localhost:4000

Cheers!

Looks like that note display mixin has been refactored and moved to here

I very much would like the initial '##'s not to be shown (and the main problem is indeed the # character since almost all of the markdown syntax polluting my sidebar is # ## ### ### etc (ie headings)

I've set up a dev env using docker-compose and am having a look at the code. From what I can see I wonder if a simple way to fix this would be to amend the regexp to match [#+] as an extra match group, but then to discard the matched #'s in the subsequent code, passing only the stripped title and preview to title and preview.

Suggestions/guidance on how you would prefer this to be fixed is welcome

I've submitted a PR for this just now: #510

Fixed via #649

Was this page helpful?
0 / 5 - 0 ratings