Coder Social home page Coder Social logo

cybermonday's Introduction

Anurag's GitHub stats

cybermonday's People

Contributors

borkdude avatar dependabot[bot] avatar github-actions[bot] avatar kiranshila avatar lucianolaratelli avatar rickmoynihan avatar stelcodes 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  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

cybermonday's Issues

Markdown => IR => transformations => Markdown

I am interested in making programmatic changes to markdown templates, writing the modified markdown back to a file. I don't see a function for exporting back to markdown (only HTML), so I am wondering if I've missed something, or how one might accomplish such a thing.

Round Trip?

Can I do a round trip from my AST representation back to the original Markdown instead of HTML?

Attribute merging

Finish getting the flexmark attributes deal working

The idea was to merge children attribute notes into the attributes map of the parent, but not every parent has attributes. This may need to be a design change such that all AST nodes include an least an empty map such that potential children attribute nodes can merge in their contents.

Illegal state exception: parser IR on some HTML

Hey! Thanks for this package. It's made my life easy.

I'm getting an IllegalStateException from within the library.

Message

Execution error (IllegalStateException) at cybermonday.ir/fold-inline-html$fn (ir.cljc:55).
Can't pop empty vector

I am unsure how to proceed with troubleshooting or what might be causing this inconsistent state.

Code's here:

(vswap! state pop)

Reproducing

  1. Read https://github.com/jakeisnt/wiki/blob/2319342e442da8580189c639b9dd64382ef49d61/pages/smess.md in to a string.
  2. Invoke (parse-md) on that file string.

The offending text in the file is <span class="spurious-link"target="matrix.org">*matrix.org*</span>; this may be a problem with other HTML in markdown contexts as well.

Here's my entire context if you're interested: https://github.com/jakeisnt/site/blob/9aa28a968f0f1cd5e8ca8567852cb7d0479c96ca/src/main.clj

Feature Request: Support for Table of Contents Flexmark Extension

Hi there! I'm a big fan of Cybermonday, I'm using it in a static site generator I'm working on.

I'm wondering if you'd be open to including support for the Table of Contents Flexmark Extension. Basically you just add a line of [TOC] or [TOC levels=1-3] and you get a table of contents which is just a tree of nested ul elements with links to the heading anchors.

I got excited and actually implemented this today, and from what I can tell it works great! Are you interested in adding this extension/feature? I know you want to keep some parity with the CLJS side. I don't have any code for that atm.

Remove build dependencies from cybermonday library deps

The library explicitly includes shadow-cljs as a library dependency, which leads to a lot of unnecessary dependencies being exported to consuming applications.

Build time deps should as these should ideally not be exposed to consuming apps.

Relatedly the flexmark-test-util dependency pulls in junit which is another such dep.

Why is this important?

These deps are introducing libraries to classpaths which have known CVE's against them. In almost all cases these CVEs will not be used or exploitable; they do however cause false positives which need to be handled by automated tools such as nvd-clojure.

Add Mustache style placeholders for text substitution

This is a feature request rather than a true issue so please feel free to ignore it -- I am using Mustache style markers in my Markdown such as {{name}} to be replaced with Tom - If the {{ }} could be separated out as nodes it would make them easier to process -- I could do this outside of Cybermonday but I was thinking it may not be very difficult and it may be that flexmark already can handle this (I am using Clojure not Clojurescript). I thought I'd ask .

Here is an example from my application (the example has an {{#if }} {{/if }} construct that may not be standard mustache):
[:p
{}
"FOR VALUE RECEIVED, the undersigned, {{maker}}, {{#if individual}}an individual residing{{else}}a company registered{{/if}} at {{makerAddress}} (“Maker”), hereby promises to pay to the order of {{lender}}, a {{legalEntity}}, having offices at {{lenderAddress}}, or its successors and permitted assigns (“Lender” or the “Company”), the principal sum of {{principal as "0,0.00 CCC"}}, plus any and all interest accrued thereon at the Note Rate (defined below), each due and payable in cash in lawful money of the United States on the dates and in the manner set forth in this Promissory Note (this “Note”)."]

CVE-2021-37714

This comes from the hickory dependency, which seems abandoned.

There is an unmerged PR which appears to fix it here: clj-commons/hickory#62

However it seems it's unlikely to get merged. In the short term I'd suggest adding a dep on jsoup to cybermonday that bumps to the version in that PR; and we can over the medium/longer term look at forking hickory and ensuring it is adequately maintained (I've skimmed some of the forks and non look like good long term bets).

Is hickory just used for cybermonday on the JVM side of things, or clojurescript too?

Reference links with a space between don't work

cybermonday.core> (md-to-ir "[hobbit-hole][1]\n\n[1]:#link")
[:div
 {}
 [:p
  {}
  [:cybermonday.ir/link-ref
   {:reference
    [:cybermonday.ir/reference {:title nil, :label "1", :href "#link"}]}
   "hobbit-hole"]]
 [:cybermonday.ir/reference {:title nil, :label "1", :href "#link"}]]
cybermonday.core> (md-to-ir "[hobbit-hole] [1]\n\n[1]:#link")
[:div
 {}
 [:p
  {}
  [:cybermonday.ir/link-ref {:reference nil} "hobbit-hole"]
  nil
  [:cybermonday.ir/link-ref
   {:reference
    [:cybermonday.ir/reference {:title nil, :label "1", :href "#link"}]}
   "1"]]
 [:cybermonday.ir/reference {:title nil, :label "1", :href "#link"}]]
cybermonday.core> 

Expand Templating

Right now, the templating is very naive, allowing for tagging the most basic mustache-style syntax of {{foo}}

I really like the mustache spec and would like to support more of the features. I need to work out how to interleave that into the parsing, for example not templating in preformatted-contexts like code blocks.

Any suggestions on useful behavior, please let me know.

CVE-2017-18640

Just a note that the upstream library io.forward/yaml and consequently this library which depends on it, are flagged by nvd as being potentially vulnerable to the above CVE-2017-18640.

The library's master branch bumps its snakeyaml dependency to a more recent version which fixes the issue, however no release has been coined upstream.

I have opened an issue upstream here asking if they can create a new non-snapshot release: owainlewis/yaml#40

Though NOTE also the latest commit on their master branch also changes their maven group name.

In the mean time I suspect it is possible to include the snakeyaml dep here at a more recent version.

Links in list items

Currently broken

* [A link](#target)

just creates

[::ir/list-item "[A link](#target)"]

Instead of

[::ir/list-item [:p [::ir/link {:href "#target"} "A link"]

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.