Coder Social home page Coder Social logo

Comments (2)

jgm avatar jgm commented on June 12, 2024

The rules you're quoting are said to cover "precedence for inline containers." The way I was thinking of it, that excludes things like code spans and attributes. These have precedence over inline containers. In a full spec, all of this would need to be spelled out more explicitly.

Maybe the other issue is now fixed? With the latest in main I'm getting:

% ./djot 
*{a=[txt](url)
<p>*{a=<a href="url">txt</a></p>

from djot.

hellux avatar hellux commented on June 12, 2024

The rules you're quoting are said to cover "precedence for inline containers." The way I was thinking of it, that excludes things like code spans and attributes. These have precedence over inline containers. In a full spec, all of this would need to be spelled out more explicitly.

Yes, and this precedence is probably the better alternative, but it does requires backtracking to parse. You have to parse for attributes first, and if it fails you have to go back and parse everything again. But I guess it should still be parsable in linear time, it is not really possible to nest arbitrarily many attributes within each other (trying to open another quote/comment will close the previous one).

Maybe the other issue is now fixed? With the latest in main I'm getting:

% ./djot 
*{a=[txt](url)
<p>*{a=<a href="url">txt</a></p>

I think I accidentally typed the example without quotes. With quotes it still parses as text on the main branch:

% ./djot
*{a="[txt](url)
<p>*{a=&ldquo;[txt](url)</p>

from djot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.