GithubHelp home page GithubHelp logo

jsamsa / python-textile Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sebix/python-textile

59.0 59.0 1.0 209 KB

A Python port of Textile, A humane web text generator

Home Page: http://loopcore.com/python-textile

Python 100.00%

python-textile's People

Contributors

jsamsa avatar kurtraschke avatar robhudson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

guniorobot

python-textile's Issues

[Feature request] Linkify URLs in input

It would be really nice if it was possible to have URLs in the input string turned into links:

>>> from textile import textile
>>> textile('http://www.google.co.uk/")
'<a href="http://www.google.co.uk">http://www.google.co.uk</a>'

Footnote references are not resolved unless put after letter

>>> import textile

This is OK:

>>> textile.textile("Ala ma kota[1]")
'\t<p>Ala ma kota<sup class="footnote"><a href="#fn217a423d-2aca-4b3b-b18d-65cfc5cf4022">1</a></sup></p>'

But this is not:

>>> textile.textile("Ala ma kota”[1]")
'\t<p>Ala ma kota\xe2\x80\x9d[1]</p>'
>>> textile.textile("Ala ma kota\"[1]")
'\t<p>Ala ma kota&#8221;[1]</p>'
>>> textile.textile("Blah,[3] blah, blah")
'\t<p>Blah,[3] blah, blah</p>'

In general it looks like [no] markers must be put after letter to be handled properly. In real texts I often see them after quotes or punctuation.

Tested on textile 2.1.4 (as present in Ubuntu 10.04)

em issue

This currently doesn't work on the latest released version: _italic_word_. The textism site renders it correctly leading me to believe this project should too. :)

Links with brackets processed with problems

In [5]: from textile import textile
In [7]: textile('http://en.wikipedia.org/wiki/Game_(rapper)')
Out[7]: '<p><a href="http://en.wikipedia.org/wiki/Game_">http://en.wikipedia.org/wiki/Game_</a>(rapper)</p>'

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.