GithubHelp home page GithubHelp logo

hirotoshioi / scrapbox Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 358 KB

Scrapbox parser and renderer

Home Page: https://scrapbox.io/scrapbox-parser/

License: BSD 3-Clause "New" or "Revised" License

Haskell 98.65% Makefile 0.64% Nix 0.71%
haskell scrapbox markdown parser

scrapbox's Introduction

scrapbox

Build Status

scrapbox is a parser library for scrapbox.

scrapbox can be used in several ways:

  • Parse given scrapbox page and express them as structured tree
  • Parse commonmark and either express them as structured tree or convert it into scrapbox page
  • (Experimental) Convert given scrapbox page into commonmark

The library is well-tested including round-trip test which tests whether given arbitrary tree can be rendered, then parsed as original tree.

Known issues

  • When parsing commonmark, it cannot parse CUSTOM_INLINE, CUSTOM_BLOCK, THEMATIC_BLOCK properly
  • When parsing scrapbox, some of the inline styles cannot be parsed correctly
  • When parsing scrapbox, it cannot parse correctly when user-defined styles are being used.

scrapbox's People

Contributors

hirotoshioi avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

scrapbox's Issues

Render scrapbox data type into commonmark

Render scrapbox data type into commonmark.

This enables the library to:

  • Convert given scrapbox page into commonmark.
  • Convert the backup file into list of commonmarks.

Refactor test codes

Since there's 700+ lines of code for testing the parser, let's split up the test suites.

Implement paragraph parser on commonmark

Cmark miss out some of syntax, implement parser for it.
example:
Bold with no spaces: Helloworld
Strikethrough: Helloworld
In some situation, Heading:
##Hello world

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.