Comments (6)
more pleasant to read
I agree. Of course, you now have the option to write your documents this way -- it's just not a requirement.
The syntax becomes more consistent: Going from one paragraph to multiple paragraphs does not require changing the initial paragraph.
I'm not quite sure what example you have in mind here.
I thought about disallowing laziness when first designing djot, but then I realized we'd still have to figure out how to deal with things like
> foo
bar
When we hit the second line bar
, the block quote still hasn't been closed (by a blank line). So what do we do? There are three alternatives:
- Throw an error. Currently djot doesn't do that; like markdown, it always gives you a parse.
- Parse it as a lazy continuation -- that is, add the text to the last open container.
- Parse it as a new paragraph.
I chose 2 partly on the grounds of syntactic consistency. 3 gives you a kind of inconsistency: normally you need a blank line before a new paragraph, but not right after a block quote.
from djot.
I'm not quite sure what example you have in mind here.
List item with one paragraph:
* First paragraph
that continues in another line.
List item with two paragraphs – I had to indent the second line of the first paragraph.
* First paragraph
that continues in another line.
Second paragraph
that continues in another line.
Loosely related: Triple colons (:::
) don’t normally end a paragraph but they do so in a list item (unless that item is indented):
* First paragraph
continues here.
::: note
:::
I thought about disallowing laziness when first designing djot, but then I realized we'd still have to figure out how to deal with things like [...]
I’d parse it as a new paragraph – which is similar to how parsing behaves for other block constructs – e.g.:
> foo
::: bar
:::
from djot.
List item with two paragraphs – I had to indent the second line of the first paragraph.
No you don't. This works fine:
* First paragraph
that continues in another line.
Second paragraph
that continues in another line.
from djot.
Ah, OK. My bad!
I’d still prefer the rules to be the same:
- First paragraph: indentation optional
- Subsequent paragraphs: indentation required
Also, code blocks and divs seem to require indentation even if they come first:
* ```
abc
```
* ::: div
abc
:::
from djot.
Also, code blocks and divs seem to require indentation even if they come first:
Yes, because lazy lines are only possible for paragraph content.
from djot.
(I’m closing the issue. I think the discussion is finished. Both positions are reasonable.)
from djot.
Related Issues (20)
- Attribute references HOT 4
- Playground should provide examples
- Tables with a column of th elements HOT 1
- Typo in syntax.md
- Proposal: Punctuation Character for Code Block's language specifier HOT 6
- Playground: slow on Safari HOT 5
- Supporting “commands” in addition to “classes” in attributes? HOT 2
- Two asterisks for “strong”? HOT 3
- Inline footnotes?
- Support `<dfn>`, `<cite>` and `<i>`? HOT 2
- Parsing inconsistency: lazy paragraph lines in lists HOT 4
- The closing delimiter of a div block can interrupt a paragraph HOT 4
- Should block attributes mark a div block delimiter as opening? HOT 1
- section nesting for non-consecutive heading levels HOT 1
- [Proposal] more permissive definition of allowed symbol syntax HOT 43
- [Proposal] Remove leading whitespace HOT 2
- Allow any valid HTML4 identifier string to be a djot identifier string HOT 2
- Allow underscore in task list to denote unchecked item HOT 2
- loose list appears unexpectedly when using tight lists HOT 4
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 djot.