Git Product home page Git Product logo

Comments (5)

mcepl avatar mcepl commented on July 26, 2024 1

Works fine. Thank you (even with python2 on RHEL-7 with gedit-3.22.0-3).

from gedit-rest-plugin.

bittner avatar bittner commented on July 26, 2024

Strange that I never noticed that. Looks like I've always tested with .rst files only! 😧

I don't like the idea of an if filetype == 'reST':, there should be a way to have the plugin being hit only when the reST markup is activated. Though, markup and rendering isn't necessarily the same thing, hmmm...

Whatever the solution may look like, file a PR and we'll discuss it.

Rendering Works For Buffers, Not Only Files

Note that rendering of reStructuredText is not done only for saved files in this plugin. You can open a blank text view/window and type reStructuredText syntax, and the plugin will generate HTML and display it in the bottom panel.

You can also select only a part of your text document (e.g. a code snippet in an article about reST), and have it rendered in the reStructuredText viewer panel (only the selection is fed to docutils/Sphinx for converting it to HTML).

from gedit-rest-plugin.

mcepl avatar mcepl commented on July 26, 2024

I don’t like if filetype == 'reST': either (I would a way prefer clean Emacs/vim style of filetype modes), but I don’t see how to do it cleanly with gedit. But I really don’t like my Python code being processed as reSt as well.

from gedit-rest-plugin.

bittner avatar bittner commented on July 26, 2024

I'm trying to implement the if filetype == 'reST' feature now.

Anyone having any idea of where to get the filetype from?

The API docs for plugin development suggest that there is only access to the MIME type. Unfortunately, this is always text/plain, which doesn't help much.

from gedit-rest-plugin.

bittner avatar bittner commented on July 26, 2024

Fixed via d89fdee.

from gedit-rest-plugin.

Related Issues (17)

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.