taozhi8833998 / taozhi8833998/node-sql-parser

Request for help. My product manager has requested to preserve line breaks in SQL expressions, but the content I obtained through parser.sqlify no longer contains any line breaks.

Open
#1,689 2 comments 0 reactions 1 assignee View on GitHub

@taozhi8833998 is already working on this.

Since Dec 4, 2023.

Dominant language
PEG.js
Stars
1k
Forks
244
PR merge metrics
No merged PRs in 30d

Description

Original requirement: The product manager wants users to input custom expressions, and the frontend performs formatting validation, field validation, and provides shortcuts for syntax input. I have successfully addressed these requirements using this library. For example, when performing field validation, I return the fields in the form of [xx] and later dynamically replace these [xx] with <span title="xx does not exist">xx</span> using regular expressions. Of course, I have taken into account the risk of HTML injection.

Now the problem is, when users input line breaks, for example, some users may input very long expressions and expect to preserve some basic formatting. However, when using sqlify, the line breaks and content indentation are lost. Can you please advise on how to proceed?"

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.