Coder Social home page Coder Social logo

Examples or tutorial ? about mistune-contrib HOT 5 OPEN

lepture avatar lepture commented on June 8, 2024
Examples or tutorial ?

from mistune-contrib.

Comments (5)

guyskk avatar guyskk commented on June 8, 2024

I just meet problem with meta extension, I wrote like this:

Title: A Metadata DEMO
Author: Hsiaoming Yang


# Be Pythonic

xxx

but the result is:

>>> meta.parse(txt)[0]                                                 
{'Author': 'Hsiaoming Yang\n# Be Pythonic', 'Title': 'A Metadata DEMO'}
>>>         

then I wrote like this:

---
Title: A Metadata DEMO
Author: Hsiaoming Yang
---

# Be Pythonic

xxx

but the result is:

>>> meta.parse(txt)[0]                                                 
{}
>>>         

I wrote like this:

Title: A Metadata DEMO
Author: Hsiaoming Yang
---

# Be Pythonic

xxx

it works:

>>> meta.parse(txt)[0]
{'Author': 'Hsiaoming Yang', 'Title': 'A Metadata DEMO'}         
>>>      

The syntax confusing, and didn't has any documents. Maybe it's a bug!

from mistune-contrib.

Depado avatar Depado commented on June 8, 2024

If you found a way to use it, maybe you could write up a small tutorial on how you did things. I wrote an article on the MathJax problem : http://depado.markdownblog.com/2015-09-29-mistune-parser-syntax-highlighter-mathjax-support-and-centered-images

from mistune-contrib.

yxy avatar yxy commented on June 8, 2024

@guyskk just to read the source, and you will know how it works.

from mistune-contrib.

guyskk avatar guyskk commented on June 8, 2024

@yxy #7

from mistune-contrib.

yxy avatar yxy commented on June 8, 2024

@guyskk yeah, import yaml makes more scalable, but introduce another dependency also make more complicated. reminds me this jok: Someone ask a programer that he wants a banana, and the programer gives him a forest.

So, all I want is just a simple meta key-value info, here is what I try to do #13 , just to simply this solution.

from mistune-contrib.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.