markup icon indicating copy to clipboard operation
markup copied to clipboard

asciidoc strikethrough (line-through) does not work

Open samcv opened this issue 8 years ago • 8 comments

[line-through]#Eventually we will have instructions on how to make it specific to
perl6 filetypes and make it apply globally#

Should render:

~Eventually we will have instructions on how to make it specific to perl6 filetypes and make it apply globally~

Currently renders the same as normal text. Looking at the rendered tags, it doesn't seem to show up in class/id's either, and it appears like other text is rendered in the html (doesn't appear to be caused by missing CSS elements).

samcv avatar Oct 08 '17 07:10 samcv

it has been deprecated http://asciidoctor.org/docs/user-manual/#migrate-deprecated

daggerok avatar Jan 17 '18 23:01 daggerok

That's not entirely accurate. These roles need to be handled differently. While I agree the big, small and color roles should be deprecated, the line decoration roles have semantic meaning and are thus still relevant.

The main issue here is that GitHub does not apply styles to any formatting elements, so the processor (Asciidoctor) needs to spit out dedicated HTML elements. For example, line-through should be emitted as a <del> element and underline a <u> element. See https://github.com/asciidoctor/asciidoctor/issues/1030

mojavelinux avatar Jan 18 '18 01:01 mojavelinux

@mojavelinux @daggerok do you know how can I use strike-through with GitHub asciidoc now?

lostmsu avatar Sep 19 '19 02:09 lostmsu

Nope, the situation is unchanged. We will be addressing this in the new semantic HTML5 converter for Asciidoctor, which should reduce some burden on the GitHub styling requirements.

mojavelinux avatar Sep 19 '19 02:09 mojavelinux

So there is no workaround for having striked through text in asciidoc in github ?

sgandon avatar May 11 '20 11:05 sgandon

Just answering my own question and @samcv once, this worked for me.

++++
<s>Eventually we will have instructions on how to make it specific to
perl6 filetypes and make it apply globally</s>
++++

sgandon avatar May 11 '20 11:05 sgandon

You can simplify this further or apply it more granularly using the inline passthrough:

+++<del>+++Eventually we will have instructions on how to make it specific to
perl6 filetypes and make it apply globally+++</del>+++

(This way, it still makes a paragraph).

The risk of using a passthrough is that you've coupled your AsciiDoc to HTML...but if you're not concerned about that, then this allows you to accomplish what you're after.

mojavelinux avatar May 13 '20 09:05 mojavelinux

You can simplify this further or apply it more granularly using the inline passthrough:

+++<del>+++Eventually we will have instructions on how to make it specific to
perl6 filetypes and make it apply globally+++</del>+++

worked for me, thank you.

kvegh avatar Jan 04 '21 18:01 kvegh

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Dec 05 '24 12:12 github-actions[bot]