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

support strike-through, sub and superscript #7

Closed
maxandersen opened this issue Jul 18, 2016 · 5 comments
Closed

support strike-through, sub and superscript #7

maxandersen opened this issue Jul 18, 2016 · 5 comments

Comments

@maxandersen
Copy link
Owner

asciidoctor google store extension uses <s>strike</s> and asciidoctor docs says [line-through]#strike# should work (but be deprecated) but neither does not seem to render in asciidoc.js nor asciidoctor output.

@maxandersen
Copy link
Owner Author

@mojavelinux any recommendations on how to best represent strike-through and even sub/super-script which seem to be similar not working for me in asciidoc.js.

@mojavelinux
Copy link

It's important to understand that line-through is just a CSS role. Therefore, it needs support from the stylesheet in order to appear as though it is working.

If I run the following through Asciidoctor (or Asciidoctor.js):

[.line-through]#strike#

I get:

<span class="line-through">strike</span>

The default stylesheet has a rule for this:

.line-through{text-decoration:line-through}

You would need to do the same.

It is possible to customize the HTML that is generated using custom templates (Asciidoctor.js supports Jade templates). In that case, you'd override the template for inline_quoted, check for the line-through role and produce either an <s> or, preferably, a <del> instead of the span.

An enhancement to produce the <del> element is currently being deliberated. See asciidoctor/asciidoctor#1030.

@mojavelinux
Copy link

It is possible to customize the HTML that is generated using custom templates (Asciidoctor.js supports Jade templates).

We need documentation for doing this. Even I'm not exactly sure how to set it up (it's been on my list). But I know it's possible because it is used in AsciidocFx.

@maxandersen
Copy link
Owner Author

Got it! I figured out why I could not get it to work. I had [.line-through]# strike # so I need to trim it ;)

@maxandersen maxandersen changed the title support strike-through support strike-through, sub and superscript Jul 29, 2016
@mojavelinux
Copy link

Yep, that would be a problem. If the formatting marks aren't directly adjacent to a word boundary, you'd need to double them up.

[.line-through]## strike ##

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

2 participants