Skip to content

Commit

Permalink
upd markdown.md
Browse files Browse the repository at this point in the history
  • Loading branch information
halyph committed Nov 10, 2023
1 parent 23d935e commit 9ab19c9
Showing 1 changed file with 76 additions and 68 deletions.
144 changes: 76 additions & 68 deletions docs/wiki/howtos/markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,10 @@ tags:

See [Markdown Guide](https://www.markdownguide.org/basic-syntax/#code).

## Folded text
## Collapsed text

See details [HTML Details Element `<details>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details).

````
```markdown
<details>
<summary>
<b><a href="https://github.com/sbt/sbt">sbt</a></b> (🥇33 · ⭐ 4.7K) - sbt, the interactive build tool.
<code>
<a href="http://bit.ly/3nYMfla">Apache-2</a>
</code>
<code>
[MIT](http://bit.ly/34MBwT8)
</code>
<code>
<img src="https://scalac.io/wp-content/uploads/2021/02/image-125-1.svg" style="display:inline;" width="13" height="13">
</code>
</summary>
- [GitHub](https://github.com/sbt/sbt) (👨‍💻 410 · 🔀 920 · 📥 12M · 📋 4.1K - 18% open · ⏱️ 02.11.2023):
```
git clone https://github.com/sbt/sbt
```
</details>
```
````

!!! example

Expand All @@ -65,9 +43,37 @@ See [Markdown Guide](https://www.markdownguide.org/basic-syntax/#code).
</details>
</div>


??? note "Markdown"

````
```markdown
<details>
<summary>
<b><a href="https://github.com/sbt/sbt">sbt</a></b> (🥇33 · ⭐ 4.7K) - sbt, the interactive build tool.
<code>
<a href="http://bit.ly/3nYMfla">Apache-2</a>
</code>
<code>
[MIT](http://bit.ly/34MBwT8)
</code>
<code>
<img src="https://scalac.io/wp-content/uploads/2021/02/image-125-1.svg" style="display:inline;" width="13" height="13">
</code>
</summary>

- [GitHub](https://github.com/sbt/sbt) (👨‍💻 410 · 🔀 920 · 📥 12M · 📋 4.1K - 18% open · ⏱️ 02.11.2023):

```
git clone https://github.com/sbt/sbt
```
</details>
```
````

## Links at the bottom of the text

```markdown
```markdown title="Markdown"
[text](http://a.com)

[text][id]
Expand All @@ -79,11 +85,10 @@ See [Markdown Guide](https://www.markdownguide.org/basic-syntax/#code).

Actually there is no simple solution and you should insert plain HTML table.

````
<table>
<tr>
<th>Python snippet</th>
<th>Ruby snippet</th>
<th>Ruby snippet</th>
</tr>
<tr>
<td>
Expand Down Expand Up @@ -118,52 +123,55 @@ puts say.upcase
</td>
</tr>
</table>
````

<table>
<tr>
<th>Python snippet</th>
<th>Ruby snippet</th>
</tr>
<tr>
<td>

```python
# Python 3: Fibonacci series up to n
>>> def fib(n):
>>> a, b = 0, 1
>>> while a < n:
>>> print(a, end=' ')
>>> a, b = b, a+b
>>> print()
>>> fib(1000)
0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987
```
</td>
<td>

```ruby
# Output "I love Ruby"
say = "I love Ruby"
puts say

# Output "I *LOVE* RUBY"
say['love'] = "*love*"
puts say.upcase

# Output "I *love* Ruby"
# five times
5.times { puts say }
```
</td>
</tr>
</table>
??? note "Markdown"

````
<table>
<tr>
<th>Python snippet</th>
<th>Ruby snippet</th>
</tr>
<tr>
<td>

```python
# Python 3: Fibonacci series up to n
>>> def fib(n):
>>> a, b = 0, 1
>>> while a < n:
>>> print(a, end=' ')
>>> a, b = b, a+b
>>> print()
>>> fib(1000)
0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987
```
</td>
<td>

```ruby
# Output "I love Ruby"
say = "I love Ruby"
puts say

# Output "I *LOVE* RUBY"
say['love'] = "*love*"
puts say.upcase

# Output "I *love* Ruby"
# five times
5.times { puts say }
```
</td>
</tr>
</table>
````

## Escape backticks `` ` `` in multiline code block

If you need to show extra backticks, enclose them with a higher number of them.

`````text
`````markdown title="Markdown"
````
```python
print("Hello")
Expand Down

0 comments on commit 9ab19c9

Please sign in to comment.