MarkedText - marcação de uma pessoa saudável

Olá, meu nome é Dmitry Karlovsky e escrevo todos os meus artigos (e apresentações ) na marcação MarkDown . E sabe de uma coisa? Ela já me cutucou muito bem! Escrevo textos em russo, mas a maioria dos caracteres especiais estão apenas no layout do teclado em inglês. E a edição de mesa é a eterna torre inclinada de Pisa. Resumindo, ele tem problemas tanto com a facilidade de edição quanto com a clareza da apresentação. Então, vamos tentar projetá-lo do zero, sem arrastar quilotons de designs intrigantes conosco.





O layout foi um pouco, desde que um novo vizivig de curva foi lançado em Habré. Portanto, agora será extremamente difícil escrever artigos no markdown e, em seguida, enviá-los para o Habr. Com layout normal, você pode ler este artigo no github: https://github.com/nin-jin/HabHub/issues/39





Princípios

  • Sintaxe inequívoca





  • Simplicidade de sintaxe





  • Consistência de sintaxe





  • Impacto mínimo em texto de aparência natural





  • Facilidade de edição, independentemente do layout





  • Visibilidade da apresentação





  • Extensibilidade





  • Capacidade de memorização rápida e confiável





Como caracteres de formatação especiais, é melhor usar aqueles que estão em qualquer layout, e não apenas em inglês. Ou seja, em igualdade de circunstâncias, é melhor dar preferência aos seguintes caracteres:!



"



;



%



:



?



*



(



)



_



+



/



\



.



,



-



=







Soluções existentes

, . : AsciiDoc, BBCode, Creole, GitHub Flavored Markdown, Markdown, Markdown Extra, MediaWiki, MultiMarkdown, Org-mode, PmWiki, POD, reStructuredText, Textile, Texy, txt2tag.





. , BBCode - HTML . . POD, .





, . . , .





: . . .





. . "". :





- item
* item
+ item

      
      



- . . 2 - , , . :





- first
- second
  - first of second
    - first of first of second
  - second of second 
- third

      
      



  • first





  • second





    • first of second





      • first of first of second





    • second of second





  • third





. - , . , :





1. item
2) item

      
      



, - :





# item

      
      



. , :





+ first
+ second
  + first of second
    + first of first of second
  + second of second 
+ third

      
      



  1. first





  2. second





    1. first of second





      1. first of first of second





    2. second of second





  3. third





, , - . - :





> quote
> - list in quote
> > inner quote

      
      



, . , :





" quote
" - list in quote
" " inner quote

      
      



- . :





|=  |= table |= header |
| a | table  | row     |
| b | table  | row     |

|   | table | header |
|---|-------|--------|
| a | table | row    |
| b | table | row    |

First Header | Second Header
------------ | -------------
Content from cell 1 | Content from cell 2
Content in the first column | Content in the second column

      
      



, - .





, - . , , .





, , - , , :





|   | table                                                                                                                          | header |
| a | There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable.  | row     |
| b | table                                                                                                                          | row     |

      
      



, - . - , , , :





! 
  ! table
    ! header
! a
  ! There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable.
    ! row
! b
  ! table 
    ! row

      
      



, . , . . . .





:





Level 1 Heading
===============

Level 2 Heading
---------------

Level 3 Heading
~~~~~~~~~~~~~~~

      
      



, , , , , - .





, :





# Level 1 Heading #
## Level 2 Heading ##
### Level 3 Heading ###

      
      



, , . :





## Level 2 Heading
== Level 2 Heading
** Level 2 Heading
!! Level 2 Heading
++ Level 2 Heading

      
      



. , , . - , . , :





= Level 1 Heading
== Level 2 Heading
=== Level 3 Heading

      
      



:





```markdown
preformatted 
        text
```

      
      



, , . . , , 2 4 :





    preformatted 
            text

      
      



, , . , , .





, . , - /.





:





  • 2 .





  • .





:





    preformatted
            text
  --deleted
  --   text
  ++inserted
  ++    text
  **highlighted
  **       text

      
      



? . . - . , , - . - , , .





- "". , , . -. :





  • 1 - , , .





  • 3 - , - .





  • 2 - , .





, , , . , : . - , , . , .





:





*strong*
**strong**
__strong__
'''strong'''
''strong''

      
      



, . "" - .





**strong**

      
      



strong





:





'emphasis'
''emphasis''
_emphasis_
/emphasis/
//emphasis//
*emphasis*
~emphasis~

      
      



. , , , .





//emphasis//

      
      



emphasis





, , . . , , . .





, :





_insertion_
__insertion__
+insertion+

      
      



:





~deletion~
~~deletion~~
-deletion-
--deletion--

      
      



, :





++insertion++
--deletion--

      
      



  • insertion





  • deletion





:





  • - . .





  • - . , , , - ( , , ).





:





"Text":http://example.com
http://example.com[Text]
<http: example.com|text="">
[Text|http://example.com]
[[Text|http://example.com]]
[[http://example.com|Text]]
[Text http://example.com]
[http://example.com Text]
[Text](http://example.com)
`Text <http: example.com="">`_

      
      



:





![title](http://example.com/image.png)
{{http://example.com/image.png|title}}
.. image:: /path/to/image.jpg

      
      



, . - HTML. - . .





, . - , , . : \



"



.





, - , . , \



, , .





""Embedded image\http://example.org/favicon.ico""
""Embedded video\https://youtube.com/video=1234""
""Embedded site\https://marked.hyoo.ru/""

      
      



, . :





""http://example.org/favicon.ico""
""http://example.org/favicon.ico\http://example.org/favicon.ico""

      
      



\



:





\\Clickable text\http://example.org/\\
Clickable url: \\http://example.org/\\

      
      



  • Clickable text





  • Clickable url: http://example.org/





. , - :





\\""Example\http://example.org/favicon.ico""\http://example.org/\\

      
      



. - :





+monospace text+
`monospace text`
``monospace text``
```monospace text```
|monospace text|
{{monospace text}}
{{{monospace text}}}
=code=
~verbatim~
@monospace text@
@@monospace text@@

      
      



+



=



, . - . , . ;;



. .





;;monospace text;;

      
      



monospace text







:





= MarkedText

   ** **.

--

== 

+ :
  - 
  - 
  - 
+  :
  -      
  -  
+ :
  -   
  -    

== C  

! ****
  ! ****
    ! ****
! MarkedText
  ! -   .
  ! -     .
  ! -  .
  ! -    .
  ! -     .
  ! -              .
    ! -       .
! MarkDown
  ! -    .
  ! -   .
    ! -    .
    ! -    .

== 

    const res = [ ... $hyoo_marked_line.parse( '**text**' ) ]
  --$mol_assert_equal( res[0].strong, '**text**' )
  ++$mol_assert_equal( res[0].marker, '**' )
  **$mol_assert_equal( res[0].content, 'text' )

== 

" " "  :   ,   ---- ++++   !
" " 
" "    ,    ..           C++  ,    D++  ..
" 
"     ()  

  ,     .

== 

- : \\https://marked.hyoo.ru/\\
- \\  MarkedText\https://github.com/nin-jin/HabHub/issues/39\\
- \\  TS\https://github.com/hyoo-ru/marked.hyoo.ru/\\
- \\  HTML  TS\https://github.com/hyoo-ru/marked.hyoo.ru/tree/master/to/html\\
- ""  $mol_regexp\https://github.com/hyoo-ru/mam_mol/workflows/mol_regexp/badge.svg""

      
      



  • : marked.hyoo.ru





  • TS





  • HTML TS





Comentários








All Articles