Comments (5)
Hi,
I think you've made a small mistake since this works as expected. The problem, I guess, is that you have added some kind of space before the front-matter. For example, probably an empty line at the beginning of the file.
You must take into account that Front-Matter must be always the first thing in the file. This is by design and it works exactly the same way in any other CMS system such as Jekyll or Hugo. For example, in Jekyll you can't even have the BOM mark in UTF-8 files before the Front-Matter, which I think it's kind of crazy. In MIIS's case, it allows for more than 3 dashes as Front-Matter separator, but it absolutely must be the first thing in the file.
That means: no single space or new line must exists before Front-Matter or it will be considered a part of the content. That's what's happening in your case. Since the last ---
are a way to define second level headers, that's why you're getting an <h2>
with the FM as content. This works exactly the same in previous versions of MIIS, so it's something extra you've typed in your file since you' ve upgraded MIIS.
Solution: Just remove the extra spaces or new lines at the very top of the file and it'll work 😊
I've been working hard in my spare time on the new v3.0 of MIIS that will have tons of new features and nice new things. I hope to have it finished and polished in the next few weeks.
Cheers!
from miis.
Hi,
thanks for the useful hint! I tested a little bit and found out that the jumping point is that the markdown files are in UTF8 with Unix Line ending style and not with Windows/DOS. When I store the file with DOS afterwards everything works as expected.
Question: Is this behavior also expected? I'm not sure if Jekyll or Hugo also expect this?
Thanks a lot!
By the way: MIISHanlder.dll Version 2.2.0 didn't care about Unix or Windows/DOS.
from miis.
Hi,
Ah, ok, interesting... This is why attaching the original file is always a better idea than simply pasting the contents, because even a minor detail like this can influence the result.
In MIIS's case, to detect the Front-Matter I've used a simple regular expression If you check the specific line here you can see I'm using Environment.NewLine
to detect the end of the FM. Therefore, it seeks for the current operating system's end of line. In Windows/IIS that means "\r\n". In Linux/UNIX it means "\n" and in Mac it means "\r". A nightmare IMHO. Although MIIS only works under Windows right now.
It could be easily changed so that any of them would be enough. I'll take that into consideration and think about possible problems of doing it.
However, Why are you using UNIX EOL style if you're working under Windows? Just for the sake of curiosity... Maybe you need to work with some co-workers that use Linux?
Cheers.
from miis.
Hi,
sorry for the late answer.
Thanks for your clarification. I investigated and had a look where the "\n" end of lines come from.
In my scenario I have XML files that are converted by a open-source tool (DITA-OT) to markdown.
These files result in the UNIX EOL style.
Of course it would be nice if MIIS 2.3 also supports this style.
But I expect that you invest all your time in MIIS 3.0 that hopefully comes soon;-)
Thanks so far!
from miis.
Interesting.
Yes, I have v3.0 very advanced, with a huge set of new features and extensibility. I think the bits will be ready very soon, although I have a lot of documentation work to do before releasing the final product.
I've taken into account this problem with new lines in UNIX, and it will disappear in the new version.
You can check the v3 branch for a the new code.
from miis.
Related Issues (20)
- Help wanted: readthedocs subsections HOT 3
- Invalid template: The {{content}} placeholder must be present! HOT 2
- No linking md files without extension HOT 2
- Syntax Highlight for Markdown Code Blocks? HOT 1
- Theme Material TOC Hide sub sub-levels HOT 1
- Questions about MIIS HOT 15
- Question: best strategy for images, HOT 3
- Material theme: numbering HOT 2
- Menu issues HOT 1
- Feature request: add search HOT 4
- Using web.config app settings in MD links HOT 4
- Multilingual HOT 6
- Using a template reference in `toc` is not evaluated if not mentioned in the base md file HOT 4
- Inline HTML tag <p> ignored within lists HOT 12
- Using the $&, $$ and some other $ combinations in content leads to disappearing HOT 3
- Suggestion: Unicode headings and configurable markdig with web.config HOT 2
- Resolved - IIS Installation notes HOT 1
- Is there a way to support PlantUML or mermaid? Would be great if UML diagrams could also be rendered! HOT 1
- IIS server requirements HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from miis.