Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor metadata #203

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Editor metadata #203

wants to merge 7 commits into from

Conversation

Oblomov
Copy link
Contributor

@Oblomov Oblomov commented Apr 30, 2022

This is intended to close #202 by allowing key: value metadata to be added to the toot text in the editor . All command-line options are supported and can be overriden from the editor. Comment support is removed (per IRC conversation) in favor of a YAML-style metadata block (not actual YAML though).

This allows setting some properties of the toot directly while editing
the message. It is backwards-compatible with the use of # for comment
lines and forwards-compatible with the introduction of new metadata
comments in the future. The supported ones are listed in the explanatory
message appended to the text in the editor.
In case of errors, the composed toot is fed back into the editor,
including a message about what went wrong.
The command-line arguments are reset so that if the corresponding
metacomment is removed the default value for the parameter is used
again. This ensures that the output from the editor is consistent.
As discussed on IRC, remove the filtering of lines starting
with a hash-sign. This allows pasting snippets of code that with # as
comment symbol, and allows hashtags to start on an empy line.

Metadata support is moved to a YAML-style header similar to what Jekyll
uses. We don't go full YAML though, just a simple key: value syntax
(the same as before, but without the # in front).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow setting some options from the editor
1 participant