Text reflow woes (or: I want bullets back!)y
solderpunk solderpunk at SDF.ORG
Tue Jan 14 19:34:00 GMT 2020
On Mon, Jan 13, 2020 at 05:55:04PM -0500, Sean Conner wrote:
It seems easiest to me (and my current experimental implementation in
AV-98 does this) to make the spec quite strict in this regard: verbatim
mode is toggled on/off by lines consisting of precisely 3 ticks and
nothing else. Which means...
> ````
> Note that there are four ticks.
> What's the expected result?
> Literal text?
> Or reflowed text?
> ```
The first 5 lines of this will be reflowed, the final line will trigger
literal text below it.
> ```
> This is similar to the above,
> but the block ends with four ticks,
> not the expecte three.
> ````
Literal mode is turned on by the first line but never turned off, so
there will be a literal line of four ticks and that end, and whatever
comes lext will be literalised, too!
> ``` What about trailing text?
> Is that allowd?
> What is the expected result?
> ```
Literal mode won't be turned on until the very end, and the first three
lines will be flowed.
> ```
> ```
>
> (You should be able to handle the above as well).
Hmm, I think AV-98 will handle that just fine, hang on...yep, no
problems.
> One thing to watch out for are lines that exceed the wrapping length with
> no space (or dash if you are ambitious) characters to break on.
Ah, that's an annoying edge case. I guess such lines can just be broken
at exactly the viewport width, possibly with a dash at the end of all
but the final line?
> I want to say Python. I don't program in Python, but I know I have seen
> that syntax in some lanuage.
I was briefly worried about Python docstrings (before Tomasino pointed
out we aren't using quotes at all!), but PEP 257 recommends always using
double quotes for them anyway.
Cheers,
Solderpunk
Archive home | About this archive