Giter Site home page Giter Site logo

pymarkauth's People

Contributors

elsholz avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

pymarkauth's Issues

Sections

Sections are introduced with their own heading and are structured in levels.
The root markdown object is also a section in itself; however it can't have a heading for obvious reasons.
When sections are created, they have their parent's level + 1 as their own level.
The level determines the heading's number of #s.

Tables

Markdown Tables. Column widths should be customizable. Fields for headings and items.

Code

Single-line and multi-line Code snippets.

Emojies

From GitHub flavored markdown: Emojies. Prefereable as some kind of auto-generated list of emoji-codes and (maybe) aliases.

Lists

Generate Unordered and Ordered Lists.

section.unordered_list(
    'item 1',
    'item 2',
)

# output:
"""
- item 1
- item 2
"""

Nested Lists should also be possible in the following way:

l = section.ordered_list(
    'item 1',
    'item 2',
)

l.ordered_list(
    ['item 1 subitem 1'],
    ['item 2 subitem 1', 'item 2 subitem 2'],
)

# output:
"""
1. item 1
    1. item 1 subitem 1
1. item 2
    1. item 2 subitem 1
    1. item 2 subitem 2 

Lines and Paragraphs

Lines: Join arguments with one new line character.

section.lines(
    'line 1',
    'line 2',
)

# output:
"""
line 1
line 2
"""

Paragraphs: Join arguments with two new line characters.

section.paragraphs(
    'line 1',
    'line 2',
)

# output:
"""
line 1

line 2
"""

Duplicate new lines

It's possible that more new lines are inserted than necessary. However, markdown syntax only separates between line break and empty line between lines of content (double line break).

To avoid more than two line breaks after any given content, two approaches could be used:

  1. Post process file in MarkDown.__str__ and limit the number of empty lines to one each.
  2. Define all line breaks as NewLine objects and during string conversion, limit their amount to 2.

Which approach is better still has to be determined.

Links and Images

Links with target and optional display text. Images with image source and alternative text.

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.