Merge pull request #1665 from mattermost/lfbrock-patch-2
Update markdown tests
Этот коммит содержится в:
@@ -21,6 +21,7 @@ Verify that all list types render as expected.
|
||||
```
|
||||
|
||||
**Actual:**
|
||||
|
||||
3. One
|
||||
2. Two
|
||||
1. Three
|
||||
@@ -38,12 +39,13 @@ Verify that all list types render as expected.
|
||||
```
|
||||
|
||||
**Actual:**
|
||||
1. Alpha
|
||||
1. Bravo
|
||||
|
||||
1. Alpha
|
||||
1. Bravo
|
||||
1. Charlie
|
||||
1. Delta
|
||||
1. Echo
|
||||
1. Foxtrot
|
||||
1. Echo
|
||||
1. Foxtrot
|
||||
|
||||
### Single-item Unordered List
|
||||
|
||||
@@ -99,6 +101,7 @@ Verify that all list types render as expected.
|
||||
```
|
||||
|
||||
**Actual:**
|
||||
|
||||
1. One
|
||||
+ Two
|
||||
- Three
|
||||
@@ -169,10 +172,11 @@ Verify that all list types render as expected.
|
||||
```
|
||||
|
||||
**Actual:**
|
||||
|
||||
1. One
|
||||
- Two
|
||||
|
||||
|
||||
- Two
|
||||
|
||||
|
||||
1. One
|
||||
2. Two
|
||||
|
||||
@@ -186,7 +190,42 @@ This text should be on a new line.
|
||||
```
|
||||
|
||||
**Actual:**
|
||||
|
||||
1. One
|
||||
- Two
|
||||
This text should be on a new line.
|
||||
|
||||
### Task Lists
|
||||
|
||||
**Expected:**
|
||||
```
|
||||
[ ] One
|
||||
[ ] Subpoint one
|
||||
- Normal Bullet
|
||||
[ ] Two
|
||||
[x] Completed item
|
||||
```
|
||||
|
||||
**Actual:**
|
||||
|
||||
- [ ] One
|
||||
- [ ] Subpoint one
|
||||
- Normal Bullet
|
||||
- [ ] Two
|
||||
- [x] Completed item
|
||||
|
||||
### Numbered Task Lists
|
||||
|
||||
**Expected:**
|
||||
```
|
||||
1. [ ] One
|
||||
2. [ ] Two
|
||||
3. [x] Completed item
|
||||
```
|
||||
|
||||
**Actual:**
|
||||
|
||||
1. [ ] One
|
||||
2. [ ] Two
|
||||
3. [x] Completed item
|
||||
|
||||
|
||||
231
doc/developer/tests/test-syntax-highlighting.md
Обычный файл
231
doc/developer/tests/test-syntax-highlighting.md
Обычный файл
@@ -0,0 +1,231 @@
|
||||
# Code Syntax Highlighting
|
||||
|
||||
Verify the following code blocks render as code blocks and highlight properly.
|
||||
|
||||
### Diff
|
||||
|
||||
``` diff
|
||||
*** /path/to/original ''timestamp''
|
||||
--- /path/to/new ''timestamp''
|
||||
***************
|
||||
*** 1 ****
|
||||
! This is a line.
|
||||
--- 1 ---
|
||||
! This is a replacement line.
|
||||
It is important to spell
|
||||
-removed line
|
||||
+new line
|
||||
```
|
||||
|
||||
### Apache
|
||||
|
||||
``` apache
|
||||
<VirtualHost *:80>
|
||||
DocumentRoot /www/example1
|
||||
ServerName www.example.com
|
||||
</VirtualHost>
|
||||
```
|
||||
|
||||
### Makefile
|
||||
|
||||
``` makefile
|
||||
CC=gcc
|
||||
CFLAGS=-I.
|
||||
|
||||
hellomake: hellomake.o hellofunc.o
|
||||
$(CC) -o hellomake hellomake.o hellofunc.o -I.
|
||||
```
|
||||
|
||||
### HTTP
|
||||
|
||||
``` http
|
||||
HTTP/1.1 200 OK
|
||||
Date: Sun, 28 Dec 2014 08:56:53 GMT
|
||||
Content-Length: 44
|
||||
Content-Type: text/html
|
||||
|
||||
<html><body><h1>It works!</h1></body></html>
|
||||
```
|
||||
|
||||
### JSON
|
||||
|
||||
``` json
|
||||
{"employees":[
|
||||
{"firstName":"John", "lastName":"Doe"},
|
||||
]}
|
||||
```
|
||||
|
||||
### Markdown
|
||||
|
||||
``` markdown
|
||||
**bold**
|
||||
*italics*
|
||||
[link](www.example.com)
|
||||
```
|
||||
|
||||
### JavaScript
|
||||
|
||||
``` javascript
|
||||
document.write('Hello, world!');
|
||||
```
|
||||
|
||||
### CSS
|
||||
|
||||
``` css
|
||||
body {
|
||||
background-color: red;
|
||||
}
|
||||
```
|
||||
|
||||
### NGINX
|
||||
|
||||
``` nginx
|
||||
server { # simple reverse-proxy
|
||||
listen 80;
|
||||
server_name domain2.com www.domain2.com;
|
||||
access_log logs/domain2.access.log main;
|
||||
```
|
||||
|
||||
### Objective C
|
||||
|
||||
``` objectivec
|
||||
#import <stdio.h>
|
||||
|
||||
int main (void)
|
||||
{
|
||||
printf ("Hello world!\n");
|
||||
}
|
||||
```
|
||||
|
||||
### Python
|
||||
|
||||
``` python
|
||||
print "Hello, world!"
|
||||
```
|
||||
|
||||
### XML
|
||||
|
||||
``` xml
|
||||
<employees>
|
||||
<employee>
|
||||
<firstName>John</firstName> <lastName>Doe</lastName>
|
||||
</employee>
|
||||
</employees>
|
||||
```
|
||||
|
||||
### Perl
|
||||
|
||||
``` perl
|
||||
print "Hello, World!\n";
|
||||
```
|
||||
|
||||
### Bash
|
||||
|
||||
``` bash
|
||||
echo "Hello World"
|
||||
```
|
||||
|
||||
### PHP
|
||||
|
||||
``` php
|
||||
<?php echo '<p>Hello World</p>'; ?>
|
||||
```
|
||||
|
||||
### CoffeeScript
|
||||
|
||||
``` coffee
|
||||
console.log(“Hello world!”);
|
||||
```
|
||||
|
||||
### C#
|
||||
|
||||
``` cs
|
||||
using System;
|
||||
class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("Hello, world!");
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### C++
|
||||
|
||||
``` cpp
|
||||
#include <iostream.h>
|
||||
|
||||
main()
|
||||
{
|
||||
cout << "Hello World!";
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
### SQL
|
||||
|
||||
``` sql
|
||||
SELECT column_name,column_name
|
||||
FROM table_name;
|
||||
```
|
||||
|
||||
### Go
|
||||
|
||||
``` go
|
||||
package main
|
||||
import "fmt"
|
||||
func main() {
|
||||
fmt.Println("Hello, 世界")
|
||||
}
|
||||
```
|
||||
|
||||
### Ruby
|
||||
|
||||
``` ruby
|
||||
puts "Hello, world!"
|
||||
```
|
||||
|
||||
### Java
|
||||
|
||||
``` java
|
||||
import javax.swing.JFrame; //Importing class JFrame
|
||||
import javax.swing.JLabel; //Importing class JLabel
|
||||
public class HelloWorld {
|
||||
public static void main(String[] args) {
|
||||
JFrame frame = new JFrame(); //Creating frame
|
||||
frame.setTitle("Hi!"); //Setting title frame
|
||||
frame.add(new JLabel("Hello, world!"));//Adding text to frame
|
||||
frame.pack(); //Setting size to smallest
|
||||
frame.setLocationRelativeTo(null); //Centering frame
|
||||
frame.setVisible(true); //Showing frame
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### INI
|
||||
|
||||
``` ini
|
||||
; last modified 1 April 2011 by John Doe
|
||||
[owner]
|
||||
name=John Doe
|
||||
organization=Mattermost
|
||||
```
|
||||
|
||||
### Latex Equation
|
||||
|
||||
``` latex
|
||||
\frac{d}{dx}\left( \int_{0}^{x} f(u)\,du\right)=f(x).
|
||||
```
|
||||
|
||||
### Latex Document
|
||||
|
||||
``` latex
|
||||
\documentclass{article}
|
||||
\begin{document}
|
||||
\noindent
|
||||
Are $a, b \in \mathbb{R}, then applies (a+b)^{2} = a^{2} + ab + b^{2} $ \\
|
||||
better \\
|
||||
are $a, b \in \mathbb{R}, \textrm{then applies} \, (a+b)^{2 } = a^{2 } + ab + b^{2}$\\
|
||||
\end{document}
|
||||
```
|
||||
|
||||
80
doc/developer/tests/test-tables.md
Обычный файл
80
doc/developer/tests/test-tables.md
Обычный файл
@@ -0,0 +1,80 @@
|
||||
# Markdown Tables
|
||||
|
||||
Verify that all tables render as described.
|
||||
|
||||
### Normal Tables
|
||||
|
||||
These tables use different raw text as inputs, but all three should render as the same table.
|
||||
|
||||
#### Table 1
|
||||
|
||||
Raw text:
|
||||
|
||||
```
|
||||
First Header | Second Header
|
||||
------------- | -------------
|
||||
Content Cell | Content Cell
|
||||
Content Cell | Content Cell
|
||||
```
|
||||
|
||||
Renders as:
|
||||
|
||||
First Header | Second Header
|
||||
------------- | -------------
|
||||
Content Cell | Content Cell
|
||||
Content Cell | Content Cell
|
||||
|
||||
#### Table 2
|
||||
|
||||
Raw Text:
|
||||
|
||||
```
|
||||
| First Header | Second Header |
|
||||
| ------------- | ------------- |
|
||||
| Content Cell | Content Cell |
|
||||
| Content Cell | Content Cell |
|
||||
```
|
||||
|
||||
Renders as:
|
||||
|
||||
| First Header | Second Header |
|
||||
| ------------- | ------------- |
|
||||
| Content Cell | Content Cell |
|
||||
| Content Cell | Content Cell |
|
||||
|
||||
#### Table 3
|
||||
|
||||
Raw Text:
|
||||
|
||||
```
|
||||
| First Header | Second Header |
|
||||
| ------------- | ----------- |
|
||||
| Content Cell | Content Cell|
|
||||
| Content Cell | Content Cell |
|
||||
```
|
||||
|
||||
Renders as:
|
||||
|
||||
| First Header | Second Header |
|
||||
| ------------- | ----------- |
|
||||
| Content Cell | Content Cell|
|
||||
| Content Cell | Content Cell |
|
||||
|
||||
### Tables Containing Markdown
|
||||
|
||||
This table should contain A1: Strikethrough, A2: Bold, B1: Italics, B2: Dolphin emoticon.
|
||||
|
||||
| Column\Row | 1 | 2 |
|
||||
| ------------- | ------------- |------------- |
|
||||
| A | ~~Strikethrough~~ | **Bold** |
|
||||
| B | _italics_ | :dolphin: |
|
||||
|
||||
### Table with Left, Center, and Right Aligned Columns
|
||||
|
||||
The left column should be left aligned, the center column centered and the right column should be right aligned.
|
||||
|
||||
| Left-Aligned | Center Aligned | Right Aligned |
|
||||
| :------------ |:---------------:| -----:|
|
||||
| 1 | this text | $100 |
|
||||
| 2 | is | $10 |
|
||||
| 3 | centered | $1 |
|
||||
Ссылка в новой задаче
Block a user