Skip to content

Slice editor has issues with stored queries #1367

Open
@mechanarchy

Description

The slice editor does not load stored queries properly, as it omits the trailing quote mark. My beancount file contains these lines (line numbers included for context):

   155	
   156	2021-01-01 query "Assets over time" "
   157	  SELECT date, LAST(balance)
   158	  FROM OPEN ON 2021-07-01
   159	  WHERE account_sortkey(account) ~ '[0]'
   160	"
   161	
   162	2021-01-01 query "Debt over time" "
   163	  SELECT date, NEG(LAST(balance))
   164	  FROM OPEN ON 2021-07-01
   165	  WHERE account_sortkey(account) ~ '[1]'
   166	"
   167	

When I load Fava and go to the journal view, then click on the date for one of these entries, the trailing quote is removed:
image

Suspected problem location

fava/src/fava/core/file.py

Lines 238 to 239 in 516704a

if not line.strip() or re.match(r"\S", line[0]):
return entry_lines

Related regression comment in WIP new-style client side editor UI 162c61f#r63990842

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions