程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Python artifact! Just one line of code, plain text seconds become markdown!

編輯:Python

As long as you have a plain text editor , Add a sentence , In an instant it can be Markdown Editor .

Markdeep It's a plug-in for writing plain text , It can take Markdown Syntax and rendering method of plain text , And show it on the web . meanwhile , except Markdown grammar ,Markdeep Additional support for charts 、 Mathematical equations and other expansion capabilities .

Let's see what happens first , On the left is the edit page of plain text editor , On the right is the rendering effect on the browser :

Markdeep Very easy to use , It also doesn't need to install plug-ins or networking . As shown above, just add... At the end of the plain text 「<!—Markdeep→」 The expression of that line , It can become a tunnel Markdown Editor .Markdeep There's no need to install anything else , You don't need to export 、 Compiling and other miscellaneous processes . Look at Markdeep It's simple , But it has a lot of functions , It's not inferior to Typora Wait for the orthodox Markdown Editor . Whether we write projects README file 、 Experimental report , Still have to do PPT Or write a paper , It can satisfy . This project provides many examples , For example, generated PPT What does it look like , I will show you later .

Open source code

Markdeep It's open source. , So you can download and modify the source code file directly markdeep.js. The whole editor is a JavaScript Script , All kinds of formats and rendering methods are defined above . Author expresses , At present, he is studying how to effectively reduce the size of script files .

Part of the code for table processing , The whole script has more than 5000 Line code . Author expresses , This project is originally an amateur project , It will not have complete technical support . But just submit Bug Specific enough , The author will perfect it . Besides , The project will often add some new features , from 2015 year 10 The first edition of the month , In the year to 2 The latest edition of the month , This editor has been maintained for a long time .

Markdeep How to use it?

If you need to create a Markdeep The file of , Just open any text editor , And start editing . After finishing the text editing , Just write a simple code at the bottom . then , Save this document as a plain text file , Use .md.html Extension name .

<!-- Markdeep: --><style class="fallback">body{visibility:hidden;white-space:pre;font-family:monospace}</style><script src="markdeep.min.js" charset="utf-8"></script><script src="https://casual-effects.com/markdeep/latest/markdeep.min.js" charset="utf-8"></script><script>window.alreadyProcessedMarkdeep||(document.body.style.visibility="visible")</script>

If you want to use Unicode, You need to add this sentence at the top of the document :

<meta charset="utf-8">

Want to see the effect ? You can drag the text into the browser or double-click it . Even if the network is offline, you can check the documents . If you don't want to lose format because you're offline , Can be markdeep.min.js Files and documents are kept in a folder . If you want to see Markdeep Original text , In the file URL Then add 「?noformat」 that will do .

First hand example

Xiaobian casually tested several typical Markdown grammar , such as : Agent list 、 Automatic link 、 form 、 inline image 、 Code . meanwhile ,LaTeX The mathematical expressions and graphs of can also be designed directly , Without any plug-ins . Specific effect can refer to :

In short , Complete equipment , For those familiar with Markdown My little friend said , It will be easy and convenient to use . It means , In the case of a net , Pick up a text editor at will , No one can stop you from using Markdown 了 . meanwhile , It's also very easy to preview from time to time , Just modify... In a text editor , Refresh in the browser to show the latest effect .

Markdeep Can do

As long as it is Markdown Supported by ,Markdeep Can support , It can be widely used in the industry and academia . As shown below , Documents of various themes and formats can be used Markdeep complete :

  • API file
  • teaching program
  • Game design files
  • homework
  • Course PPT
  • Software library website
  • Personal blog
  • resume
  • The paper

look Markdeep It seems that everything can be done

Python It is a very diverse and well developed language , So there will certainly be many functions I didn't consider , If anyone knows , You can tell me in the comments section


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved