Giter Club home page Giter Club logo

cooklang-rs's People

Contributors

dubadub avatar stusmall avatar tweoss avatar zheoni avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cooklang-rs's Issues

parser fails over multiple lines

multi-lines seems to be a feature of this parser

however, if an ingredient spans multiple lines, it fails to parse.

consider:

this:

Squeeze all the water from the defroshed @packed fresh spinach{5%cups}. Pulse
the spinach in a #food processor{} to roughly chop.

yields:

image

(good)

but this

Squeeze all the water from the defroshed @packed fresh
spinach{5%cups}. Pulse
the spinach in a #food
processor{} to roughly chop.

yields:

image

( bad :( )

note that when referencing an existing ingredient, this becomes a parse error.

ideally, line breaks would be valid anywhere, or at least between words.

Common special chars in names (for author/source) can break the name - url behavior

Using common special chars in names, like space, ,, ., -, _, #, ` and ', can lead to unintended behavior.

For example:

Iain M. Banks <https://some.url> -> no name and url Iain M. Banks <https://some.url>

Expected:

Iain M. Banks <https://some.url> -> name Iain M. Banks and url https://some.url

The PR #10 is improving the current behavior by adding more common special chars, that lead to the expected output and being more backward combatile. But a more general approach could be the final solution as mentioned here and here.

Problems with colons in name for author/source

Hello,

when a colon is in the name part, it will led to unexpected results:

image

It looks like, that current validation of an URL is not considering this case:

if let Ok(url) = Url::parse(s) {

If this validation will be improved, the : can be added to the regex for name and url (see) .

Have fun,
someone.earth

Encapsulated URL in author/source without a name issue

If there is no given name but an encapsulated URL, the url will be intepreted as name:

<https://rachel.url> -> name <https://rachel.url> and no URL

The expected behavior would be (at least for me):

<https://rachel.url> -> no name and url https://rachel.url

This issues could be fixed, with a approach, that is also addressing this issue.

Special Metadata: No support for uppercase and whitespace in tag names

I played a bit around with the special metadata extension (in the playground, 0.12.0) and I noticed two non-working cases that I expected to work.

Cases that didn't work:

  • Uppercase tags: >> tags: Tag
  • Tag with whitespace: >> tags: tag bla

I'm not sure if the behavior is intended but if so I think it should be documented because it is not obvious.

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.