How to make “spoiler” text in github wiki pages?

前端 未结 6 1200
盖世英雄少女心
盖世英雄少女心 2020-12-22 23:14

I\'m trying to make text which is either invisible until moused over, or, has a \"show\" / \"hide\" button, or some other thing, so that it is not visible

6条回答
  •  失恋的感觉
    2020-12-22 23:52

    Building on Gaurav's answer and this GH issue here's a way to use advanced formatting inside the

    tag on GitHub:

    Note: original answer from 2016 required

    , since 2017 that requirement is an empty line after (i.e. before expanded contents). Somewhere along the line leading up to 2019, markdown in

    is not working any more either. You can see it's quite flaky as it's a hack/workaround, not a supported feature/use case. Also note that issue/PR comments support different formatting than Wikis (e.g. 2020 April underline in summary only works on Wiki, not on issues).

    stuff with *mark* **down** in `summary` doesn't work any more, use HTML italics and bold instead in <summary> (click to expand) ## *formatted* **heading** with [a](link) ```java code block ```
    nested stuff (click to expand) A bit more than normal indentation is necessary to get the nesting correct, 1. list 1. with 1. nested 1. items ```java // including code ``` 1. blocks 1. and continued non-nested

    Currently it renders as the following with the expected parts expandable and collapsible:


    Initial state


    Click on summary


    Click on nested summary

提交回复
热议问题