Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{{}} will crash #139

Closed
epage opened this issue Oct 23, 2017 · 0 comments
Closed

{{}} will crash #139

epage opened this issue Oct 23, 2017 · 0 comments
Labels
bug Not as expected

Comments

@epage
Copy link
Member

epage commented Oct 23, 2017

From @bananenmannfrau cobalt-org/cobalt.rs#307

The following post will crash the application when building/watching

extends: default.liquid

title: test 
date: 14 January 2016 21:00:30 -0500
---

test {{}}

The {{}} are the problem. Also when enclosed in ``

The output of RUST_BACKTRACE=1 cobalt watch is:


[info]   Using config file .cobalt.yml
[warn]   Syntax theme named 'base16-ocean.dark' ignored. Reason: Themes are unsupported in this build.
[info]   Building from . into build
thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', $HOME/.cargo/registry/src/github.com-1ecc6299db9ec823/liquid-0.10.1/src/parser.rs:43:11
stack backtrace:
   0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
   1: std::sys_common::backtrace::_print
   2: std::panicking::default_hook::{{closure}}
   3: std::panicking::default_hook
   4: std::panicking::rust_panic_with_hook
   5: std::panicking::begin_panic
   6: std::panicking::begin_panic_fmt
   7: rust_begin_unwind
   8: core::panicking::panic_fmt
   9: core::panicking::panic_bounds_check
  10: liquid::parser::parse
  11: liquid::parse
  12: cobalt::document::Document::render_html
  13: cobalt::cobalt::build
  14: cobalt::build::build
  15: cobalt::serve::watch_command
  16: cobalt::run
  17: cobalt::main
  18: __rust_maybe_catch_panic
  19: std::rt::lang_start

@epage epage added the bug Not as expected label Nov 8, 2017
@epage epage changed the title {{}} in Markdown fails {{}} will crash Nov 8, 2017
@epage epage closed this as completed in 5cffe44 Dec 27, 2017
epage added a commit that referenced this issue Dec 27, 2017
* **parse:**  Error on empty expressions ([5cffe44](5cffe44), closes [#139](#139))
* **raw:**  Stop swapping the text's order ([bd45c14](bd45c14), closes [#79](#79))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Not as expected
Projects
None yet
Development

No branches or pull requests

1 participant