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

Plain text mode besides (X)HTML mode #18

Closed
dahlia opened this issue Oct 21, 2021 · 3 comments
Closed

Plain text mode besides (X)HTML mode #18

dahlia opened this issue Oct 21, 2021 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@dahlia
Copy link
Owner

dahlia commented Oct 21, 2021

Seonbi currently provides two modes for input/output formatting:

  • HTML
  • XHTML

However, sometimes we need to apply adjustments on text before it's compiled to HTML, or it won't be compiled to HTML at all. For such demands, it's good to have one more mode: plain text.

Fortunately, it apparently is not that difficult to implement:

  1. Escape the whole input to HTML character entities (or simply put it to a CDATA section).
  2. Make adjustments on it.
  3. Unescape the whole output.
@dahlia dahlia added the enhancement New feature or request label Oct 21, 2021
@dahlia dahlia self-assigned this Oct 21, 2021
dahlia added a commit that referenced this issue Nov 7, 2021
dahlia added a commit that referenced this issue Nov 8, 2021
@dahlia
Copy link
Owner Author

dahlia commented Nov 8, 2021

Now the Boolean option xhtml is replaced by the new option contentType, which should be one of text/html and application/xhtml+xml. Two tasks to do remain:

dahlia added a commit that referenced this issue Nov 8, 2021
dahlia added a commit that referenced this issue Nov 10, 2021
dahlia added a commit that referenced this issue Nov 12, 2021
dahlia added a commit that referenced this issue Nov 12, 2021
sourceHtml → content
resultHtml → content

#18
dahlia added a commit that referenced this issue Nov 12, 2021
sourceHtml → content
resultHtml → content

#18
dahlia added a commit that referenced this issue Nov 16, 2021
@dahlia
Copy link
Owner Author

dahlia commented Nov 16, 2021

Now we have 4 modes:

HTML, XHTML, Plain text, Markdown

@dahlia dahlia closed this as completed Nov 16, 2021
@channprj
Copy link

Thank you 👍🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants