hplgit / doconce

Lightweight markup language - document once, include anywhere
http://hplgit.github.io/doconce/doc/web/index.html
Other
311 stars 60 forks source link

Headings/titles without closing sequence #86

Open dumblob opened 7 years ago

dumblob commented 7 years ago

It's been already almost 2 years I came across DocOnce and since then I've realized, that it's kinda easy to convert existing documents from CommonMark to DocOnce (which was actually the primary motivation for https://github.com/hplgit/doconce/issues/50 ). The only think I didn't manage to convert is my thinking and liking of one particular syntax choice which I consider tedious, unnecessary and cluttering.

Namely the need to end headings/titles with the same sequence of characters as at the beginning. I could not find a technical reason for this decision (each such heading paragraph is anyway already separated with a newline character before and after).

Would it be possible to make these closing sequences of characters optional? I.e. instead of:

===== My Title =====

allow just:

===== My Title
KGHustad commented 7 years ago

I think we could allow for the trailing =s to be optional.

If you want it fixed soon, feel free to make a pull request.

dumblob commented 7 years ago

I'm out of time, but I looked quickly into what everything would be probably affected. These are my observations:

  1. Add mini test (probably one or two with skipped trailing = will be enough).

  2. Add notes to specification & documentation.

  3. Lines probably affected by the change (might change, but therefore the keywords next to them):

    • 921 syntax_check
    • 1583 1585 1597 1797 1896 1898 exercises
    • 2118 2122 2162 extract_individual_standalone_exercises
    • 3671 interpret_quiz_text
    • 4509 doconce2format

And I have a question based on the source code. Why does Doconce support 5 equal characters (=) at maximum? There is surely need for more "depth" in titles, subtitles, chapter titles, subchapter titles, etc.