Plain text mode besides (X)HTML mode
dahlia opened this issue · comments
Hong Minhee (洪 民憙) commented
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:
- Escape the whole input to HTML character entities (or simply put it to a CDATA section).
- Make adjustments on it.
- Unescape the whole output.
Hong Minhee (洪 民憙) commented
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:
- Add
text/plain
type. - Add
text/markdown
type. - Rename
sourceHtml
&resultHtml
fields tocontent
in HTTP API. /cc @channprj @moreal
Hong Minhee (洪 民憙) commented
Heechan Park commented
Thank you 👍🏼