-
Notifications
You must be signed in to change notification settings - Fork 156
Improve YAML front matter support #255
Comments
YAML Headers is not ignored but recognized in the editor since last release. You are right, the app should also:
I didin't try but I think it should work better when using Pandoc export though. |
What is the currently supported behavior? I am confused about what I should expect, and how I can or cannot use the YAML header. |
This: https://codemirror.net/mode/yaml-frontmatter/ |
The linked document describes internal parsing. From a user standpoint, of display, interaction, and generation, I remain confused about what to expect. |
Editor does not apply markdown styles anymore to YAML header. That's all (but I don't really see what more can be expected, except maybe fixing the issue with table of contents displayed in pane).
Abricotine is an editor, not a generator. Default HTML preview/export is provided by kramed, which does it in a very simple way. Since latest release you can also set custom tasks in order to run Pandoc or any other command-line tool to export documents, which is useful when you want an advanced control on the export (as you do). If the app behavior is not clear enough for you then my advice would be that you switch to another markdown editor. You can find many very robust alternatives on the Internet. |
Well, you're right, if I wanted to switch to another editor, then I could do so. But if you're open to suggestions, where applicable, and bug reports, where applicable, then I might be able to help. But making the distinction between a feature request and bug report depends on knowing what behavior is specified. For me, the natural interpretation of "Ignore YAML-Header" (#142) is that the header is filtered out from the stream before the stream is written to the output generators. If you intended otherwise, then I accept your intention, but my suggestion for Abricotine, irrespective of which editor I use, would be to avoid writing particular data to a generator if it processes that data differently from how the user intended. Ultimately, the discussion is not an argument over what is meant by "ignore", though that distinction was the original source of confusion. The discussion is in fact not any kind of argument. It's a simple observation that users will have a better experience adding YAML headers if doing so does not create unwanted results in the output. Even if the suggestion does not ultimately help you, I would still thank you for reading it. |
Many processors support YAML headers and actually do something useful with it, so I don't think it's a good idea to filter it out when exporting. Philosophy behind Tasks is to emphasize the distinction between edition and export. Abricotine is responsible for the editing so IMHO it should not intend to filter data before it is send to the processor (except with non standard data that is specific to the application). So IMO, YAML header should be:
|
Your earlier comment made the observation that some processors do not recognize the YAML header as a region in which to suspend Markdown processing. This was the reason you gave for the preview not displaying as one would want it to display, as I showed in the original report. Everything you stated is accurate, as I understand. My suggestion was intended to express sending YAML headers to processors that understand how to use them, and filtering out those headers for invoking processors that do not know how to process the YAML as metadata. I am not sure whether or not we are agreeing, because of the ambiguity of the word "ignore" in this context. |
I don't think the YML ignoring quite works on Windows... |
I was unsure whether opening a new issue would be warranted, compared to commenting on #142, but since #142 is represented as resolved and included in a release, I feel a new issue is appropriate.
I have included a verbatim copy of a sample document, and a screen capture of the HTML preview.
I think you would agree that the YAML header is not ignored, and I wonder whether I am misunderstanding the functionality represented in release 0.7.0. The first line is
---
, which I read is the condition that triggers processing as the ignored header.For the record, I fully support interoperability with documents using this format, including the #222 suggestion of processing the fields. Displaying and generating documents that show a formatted title, subtitle, author, date, and so on, would be very nice.
Abricotine version: 0.7.0
OS type: Linux Mint
OS version: 19.1
The text was updated successfully, but these errors were encountered: