Comments (4)
Yes, that behavior is very counterintuitive:
>> This is inside the nested block quote.
>And so is this.
>And this.
>
>But not this.
renders like this.
But that link also shows the dominance of that interpretation, so it can't really be changed. Gruber's original Markdown also does the same.
from djot.
I wouldn't call it an inconsistency; it's just that the behavior of lazy lines isn't fully described in the (rather sketchy) documentation.
The basic rule the parser uses is this: If a line would not start any other kind of block (besides a paragraph), and the last open container is a paragraph, then it gets added to that paragraph.
Since this line would be a thematic break, it doesn't qualify as a lazy paragraph continuation.
Certainly it's a good practice not to use laziness if you want to avoid this sort of thing. But I don't think that's an argument for banishing laziness.
from djot.
Ah, I understand: For lazy lines, you have to be more careful w.r.t. how you start your lines.
from djot.
The basic rule the parser uses is this: If a line would not start any other kind of block (besides a paragraph), and the last open container is a paragraph, then it gets added to that paragraph.
As an aside: It’s interesting that this rule applies at any level of nesting (via indentation or quoting) – each of the following pairs of lines produces the same output.
> > > abc
> > > def
> > > abc
> > def
> > > abc
> def
> > > abc
def
from djot.
Related Issues (20)
- 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
- Hard-wrapping: require subsequent lines to be indented/quoted? HOT 6
- Two asterisks for “strong”? HOT 3
- Inline footnotes?
- Support `<dfn>`, `<cite>` and `<i>`? HOT 2
- 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
- Use `![alt](path)` syntax not only to include images, but also text files HOT 9
- The definition item in a descrition list is always a paragraph HOT 6
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.