zk/tech/md-ext/editing.md

65 lines
1.9 KiB
Markdown
Raw Normal View History

2020-04-22 06:55:03 +00:00
%title Editing Markdown Extension
:tech:markdown:vimwiki:python:package:
## What it does
I want to be able to have editing comments in Markdown, so I came up with some extensions to the syntax. The goal should be for the text to still be at least mostly readable.
2020-04-22 08:00:04 +00:00
* [X] Additions `+{new text}`
* [X] Deletions `-{old text}`
* [X] Substitutions `~{old}{new}`
* [X] Comments `?{la de da}(comment)`
* [X] Resolutions `!{-{bad wolf}}(STET)`
2020-04-22 06:55:03 +00:00
* Metadata:
2020-04-22 08:00:04 +00:00
* [X] Comments on all types in parentheses after `~{old}{new}(comment)` etc
* [X] Attribution in parentheses in comment `+{new}(comment (Commenter))`
* [X] Date with attribution `-{old}(comment (Commenter 2020-04-21))`
* [ ] Comment as footnote `?{la de da}(^note) ... (^note): comment`
* [ ] Comments can contain markup `?{la de da}(some *markup*)`
2020-04-22 21:15:03 +00:00
```
This is a +{new} addition
This -{this} word is removed
I say, ~{out with the old}{in with the new}
Here !{just a comment} is a line with a comment
You can also ?{add comments to some text}(Like this)
All -{new}(Redundant (Makyo)) edit marks can have comments with attributions and dates +{like this}(See? (Makyo 2020-04-22)) (though it's ignored with comments !{like this}(won't show))
Bottom text
```
2020-04-22 06:55:03 +00:00
2020-04-22 10:13:25 +00:00
This is a +{new} addition
2020-04-22 06:55:03 +00:00
2020-04-22 10:13:25 +00:00
This -{this} word is removed
I say, ~{out with the old}{in with the new}
Here !{just a comment} is a line with a comment
You can also ?{add comments to some text}(Like this)
All -{new}(Redundant (Makyo)) edit marks can have comments with attributions and dates +{like this}(See? (Makyo 2020-04-22)) (though it's ignored with comments !{like this}(won't show))
2020-04-22 06:55:03 +00:00
2020-04-22 21:15:03 +00:00
Bottom text
2020-04-22 10:45:02 +00:00
2020-04-22 06:55:03 +00:00
## How to use it
```python
default_config = {
'tag_tuple': ('<div class="verse">', '</div>'),
}
my_config = {
'tag_tuple': ('<verse>', '</verse>'),
}
markdown(source, extensions=[VerseExtension(**my_config)])
```
## Where to get it
* [PyPI](https://pypi.com/project/markdown-verse)
* [Github](https://github.com/makyo/markdown-verse)