Skip to content

Find a section of a markdown document to edit using the name of the heading

Notifications You must be signed in to change notification settings

jrobertson/md_edit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Introducing the md_edit gem

require 'md_edit'


s = "# Thoughts

## Car

This will be the car history

## Bicycle

Like a bicycle log.

### Brakes

Front brakes need some work.

## Fridge

When did it last get cleaned out?
"


mde = MdEdit.new s
mde.q 'c' #=> ["car"]
mde.find 'car'
# => ["## Car", ["This will be the car history"]] 

mde.find 'bicycle'

#=> ["## Bicycle", ["Like a bicycle log.", ["### Brakes", ["Front brakes need some work."]]]] 

The md_edit gem can find a section of a markdown document by its heading. This can be helpful when editing a large document from a web page interface similar to editing a wiki page.

Resources

markdown lookup query mdedit md_edit

About

Find a section of a markdown document to edit using the name of the heading

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages