Git Product home page Git Product logo

pygame-markdown's People

Contributors

cribbersix avatar pmp-p avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

pmp-p

pygame-markdown's Issues

Add method to set markdown as string

In my code the markdown text is already a str. So to render it with MarkdownRenderer, I currently have to do this:

with tempfile.NamedTemporaryFile("w") as tmp_file:
        tmp_file.write(markdown_text)
        tmp_file.flush()
        md.set_markdown(tmp_file.name)

This is super inefficient, so please add a method to set the markdown directly as a str.
Thanks in advance!

pip install fails for pygame 2.0.1

pip gives this error when installing this.

ERROR: Could not find a version that satisfies the requirement pygame==1.9.6 (from pygame-markdown)
ERROR: No matching distribution found for pygame==1.9.6

Edit: pip install pygame-markdown --no-dependencies works.

feature request : collision match

While discussing pygbag use with teachers i came to an idea:

When rendering markup with python code inside would it be possible
to know if a ``` py ```` code block is clicked and also get an ordered list of previous code blocks ?

my idea is to edit/run on click the concatenation of previous blocks up the one clicked in document :


importing modules

import pygame
pygame.init()

init blah -blah

# some init code

init blah -blah

do stuff

#some pygame example code

Fix README.md

An exception occurs when running sample code from a README.md

TypeError: MarkdownRenderer.set_area() got an unexpected keyword argument 'offset_X'

Change code

md.set_area(surface, offset_X, offset_Y, width=-1, height=-1)

- surface - the pygame surface which the text is blitted on
- offset_X - the offset of the text from the surface's left sided border
- offset_Y- the offset of the text from the surface's top border

to

md.set_area(surface, offset_x, offset_y, width=-1, height=-1, margin=10)

- surface - the pygame surface which the text is blitted on
- offset_x- the offset of the text from the surface's left sided border
- offset_y- the offset of the text from the surface's top border

And code

md.set_area(surface=surface, offset_X=50, offset_Y=20, width=500, height=500)

to

md.set_area(surface=surface, offset_x=50, offset_y=20, width=500, height=500)

You can also add a description for the margin argument.

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.