jgm/djot

Proposal: Allow reference [link] definition to support other structure beyond links

Opened this issue · 0 comments

examples:

[link]: http://example.com
[pop-up-card]: 
  # hello world
   Lorem Ipsum
[code]: 
  ```= js
    function main(age){
          if(age>25) {return "accepted"}
          else {return "declined"}
     } 
  ```
  • It will be known just as reference defintion

The interpretation of those other kind of reference will be lt it open to the renderer engine, it allows implementing thing like popup widgets and callable code.

To maintain backward compatibility in this form [link]: http://example.com will behave exactly like now, only admitting a link that can have multiple lines, but if a line break is found after ]: it will be starting to accept a block syntax taking into account the indentation similar to how a Footnote behave.