Giter Club home page Giter Club logo

markdown-it-church-slavonic's Introduction

Church Slavonic flavor of Markdown

Build Status Coverage Status

An extension to markdown-it engine that adds Church Slavonic syntax features.

Features

Use = to mark red (kinvar color)

=Слава и ныне=

Use + to mark wide text (stretched)

+Глас а+

Leading tilda makes first letter red

~Въ едину от суббот...

Leading circumflex makes first letter "bukvitsa"

^Въ едину от суббот...

Page anchors

When page label is the same as page number:

Господи помилуй<<1>>

When page label is different:

Господи помилуй<<1: а>>

Margin verse anchors

{{а}}Господи не введи меня в напасть. {{в}}Господи даждь мне мысль благу.

More to come

Programmatic use

var md = new require('markdown-it')();
var cuPlugin = require('markdown-it-chutch-slavonic');

md.use(cuPlugin);

var out = md.render('Hello, ~Red World')
console.log(out)

out = md.render('~Red World')
console.log(out)

out = md.render('~Ꙗ҆́кѡ помо́щница ты̀ ^є҆сѝ безпомо́щныхъ человѣ́кѡвъ')
console.log(out)

out = md.render('~Ꙗ҆́кѡ {{a}} помо́щница ты̀ ^є҆сѝ <<12>>безпомо́щ<<13: huh>>ныхъ человѣ́кѡвъ')
console.log(out)

Release notes

  • 1.0.0 Changed the way we markup kinovar and wide (to leave bold/italic alone)
  • 0.0.1 Initial release

markdown-it-church-slavonic's People

Contributors

0xgeorgii avatar dependabot[bot] avatar pgmmpk avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

markdown-it-church-slavonic's Issues

Suggestion: Allow redbukva syntax for Slavonic Asterisk

It appears that the redbukva syntax ~ is only allowed for the Church Slavonic letter range defined by the regular expression. This limits usage of the syntax and disallows for one particular use case: reddening a Slavonic Asterisk with ~꙳. This is not going to be such a problem as long as issue #16 is resolved, but one thing worth considering is that a ~꙳ syntax is simply lighter than =꙳=.

May I suggest one of the following:

  1. Add Slavonic Asterisk to the regular expression for the redbukva syntax
  2. Relax or remove altogether restrictions on the redbukva syntax

Generate valid XML and LaTeX

Currently, both XML and LaTeX renderers produce invalid output, because leading part and trailing part are missing.

For XML leading should be something like:

<document>

and trailer should be

</document>

For LaTeX we need leading part of:

\documentclass{article}
\usepackage{churchslavonic}

\begin{document}

and trailer:

\end{document}

Bug: Slavonic Asterisk kinvar unexpected behavior

Slavonic Asterisk symbol enveloped into kinvar syntax = would not render as expected when preceded by an alphanumeric character.

For example, the following will render the same way as it appears in the editor: Слово=꙳= Слово1=꙳=

image image

If a punctuation symbol or whitespace is inserted just before the kinovar syntax, the abstract above renders as expected: Слово=꙳= Слово!=꙳=

image image

This behavior is somehow specific to the pattern of =꙳= (equals sign, slavonic asterisk, equals sign) only. I didn't manage to discover any other symbol combination that reproduces the bug, including Church Slavonic superscrypt symbols (i.e. =҃=)

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.