Git Product home page Git Product logo

clj-vimhelp's People

Contributors

liquidz avatar stelcodes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

stelcodes

clj-vimhelp's Issues

Refactor `vimclj.html` to use Hiccup 2.0?

Hi there, I love this library! Thanks so much for writing the parser. I'm interested in using it as a kind of plugin to a static site generator I'm writing.

The main issue I'm running into is that my project uses Hiccup's newer hiccup2.core namespace which is fundamentally incompatible with the Hiccup generated by this library. Hiccup 2.0's hiccup2.core/html macro escapes all strings in the Hiccup by default. The way to insert a raw HTML string is to use the hiccup2.core/raw function which creates a special hiccup.util.RawString object which informs the Hiccup compiler that the string should not be escaped.

Since this library uses manual string escaping with hiccup.core/h, there's just no way for me to use the vimclj.html/render* multimethod effectively. The mix of escaped and unescaped strings in the output will all get escaped when I call hiccup2.core/html.

The hiccup2.core approach is cleaner IMO because you can avoid ever running into a situation where you unintentionally escape a string twice.

I'm wondering if you would be open to refactoring this library to use Hiccup 2.0, or if that's just out of scope. This library is already perfect for the vim iced docs. I love the look of https://liquidz.github.io/vim-iced/vim-iced.html

I've already made the necessary changes to vimhelp.html/render* to fix my issue but it breaks vimhelp.html/render. If you're interested I could try to change vimhelp.html/render as well but I don't need that function for my use case.

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.