Strikethrough Not Shown in Preview


#6

Okay - ignore the critic markup bit from earlier. With a bit more research I’m not convinced that is true … probably just matches where I’ve seen it.

I haven’t been able to force the MMD engine into recognising it except by being heavy handed. Until such time as a solution is published here, the following heavy handed aproach of substituting the tilde pairs for ‘del’ tags should offer an interim solution. You can then modify the intial script based substitution action to include any additional markups that may not be available, but have HTML tags defined or CSS transformations … though you might also want to amend the preview action step as well, in order to support that.


#7

Thanks for looking into it. :slight_smile:

Did you mean for that to be a link? (Maybe the forum isn’t allowing it to be displayed as a link?)


#8

Hmmmm. I guess the forum doesn’t recognise the Drafts action URLs as valid URLS. I’ve posted a few like this where I didn’t think it was worth adding it to the official directory (this one’s hopefully just a temporary workaround) - first time anyone’s mentioned such links not working. :frowning:

Try this link instead. It is to an export of the action as a file.


#9

@sylumer
This is great! Thank you so much for putting this together! I’ve modified your action a bit to add dark/light theme support. I’ve also changed the name to “Dark/Light Preview II” because it’s going to be my go-to for previewing drafts now. Have a look.

Download Dark/Light Preview II


#10

Is there a reason you all aren’t using the Action Directory to share these actions? Just curious. It will allow you update for fixes/changes and have a stable link. If for some reason you don’t want them visible other than here, just make them unlisted. It’s a better way to share since people can preview the content of the action before installing.


#11

@agiletortoise
I didn’t realize actions could be posted as unlisted for sharing, and I didn’t want to post this one prematurely. Also, as @sylumer said in an earlier comment, we thought this was a temporary workaround. Will you be adding strikethrough to the preview by default (it’s already supported in the editor)?

In the meantime, I’ll post this action publicly in the directory so others can use it. I’ve given @sylumer credit for his code in the script’s comments and in the action’s description.

Edit:
Here’s the action in the directory.


#12

Ultimately it was a mistake that I shipped the syntax highlighting for strikethrough, as it is. This gets to the fact that I still have a little work to do figuring out how opinionated about Markdown Drafts should be.

Currently, Drafts ships only with MultiMarkdown. MultiMarkdown does not support strikethrough as you are doing it - that is a GitHub Flavored Markdown addition. It does support CriticMarkup for striking - which can be enabled by script for the output, but is off by default and does not syntax highlight.

I’d prefer not to ship multiple Markdown engines like I did in Drafts 4, but will have to assess as we move forward. This will get better once syntax highlighting definitions get opened up for customization down the road so people can better match their preferences.


#13

I’d not realised there was a way to make actions unlisted. Quite a lot of the time the actions I’ve posted for I haven’t really felt were of general use outside of the discussion and so we’re not well placed for the directory. Basically I didn’t want to clutter it with examples and junky tests. I’ll certainly look at the directory and hiding actions as a posting option going forward!


#14

I wonder if this is related to another issue report I’ve just created (or if that one is related to this one?). The behavior there is a little different, with HTML mail messages created using the Mail action displaying strikethrough text as what looks like a subscript. I created the separate issue because maybe it’s not related at all.


#15

Have you considered CommonMark? That community is vibrant and active, though not paritcularly decisive. It’s basically the most inclusive Markdown spec (has GFM and MMD features).


#16

MultiMarkdown uses the ~ tilde notation for superscript…so that’s doing what is expected from MultiMarkdown. It’s really just confusing that I’m syntax highlighting the strikethrough that MultiMarkdown does not support. I’ll do some clean up here in a release soon.


#17

I’ve considered it. I was hoping to stick with just one Markdown engine in Drafts 5, however. I may have to add CommonMark as an option. We’ll see.


#18

Well I mean just do CommonMark—skip the other specs and don’t even offer them as an option (since CommonMark sort of includes the other ones anyways).


#19

MultiMarkdown is far more popular. Many rely on it’s extensions.


#20

I am against CommonMark. It does not pass the “un_f**king_believable” test (i.e. italics in the middle of a word).


#21

That’s a good point. CommonMark is supposed to be all things for all people. But honestly, that day will probably never end. The community is so full of different opinions about the spec that the spec will likely never get finalized.

I still think it’s a good starting point, and eventually it will supplant MultiMarkdown and GFB both. But by my own accord: that day is not today :wink:


#22

Is it heresy to suggest Drafts embed HTML e.g tags round “struckthrough” text?


#23

True Story… CommonMark

I’d like to see strikethrough.

I also don’t know how this addition effects markdown as a whole. I’m looking for an agile system that works on most apps. Portability…


#24

It would not be terribly hard to do post Markdown modifications in Script if you want to add support for some special attributes. I may add additional Markdown engines at some point, but for now it’s MultiMarkdown and strikethrough is not available in it.


#25

It is if you support HTML strikethru.