code-hike / codehike

Marvellous code walkthroughs
https://codehike.org
MIT License
4.39k stars 135 forks source link

Multiple `from` annotations #401

Open ZYJLiu opened 11 months ago

ZYJLiu commented 11 months ago

Thanks for building and maintaining codehike! Awesome tool

Requesting ability to reference the separate sections of the same file using from annotation mentioned from discussions

```js
// from ./foo.js 1:3
// from ./foo.js 5:7
// from ./foo.js 10
pomber commented 11 months ago

Thanks. To clarify, the idea is to be able to import code from different files, and that may also be used to import multiple sections of one file.

```js
// from ./one.js 1:3
// from ./two.js 5:7
// from ./two.js 10