Add function to strip html tags

This commit is contained in:
Richard Ramos 2020-07-31 17:28:02 -04:00 committed by RichΛrd
parent 2f26af684a
commit 57d6e6459d
2 changed files with 4 additions and 0 deletions

View File

@ -42,3 +42,6 @@ proc signal_handler*(receiver: pointer, signal: cstring, slot: cstring) =
proc image_resizer*(imagePath: string, maxSize: int = 2000, tmpDir: string): string =
discard existsOrCreateDir(tmpDir)
result = $dos_image_resizer(imagePath.cstring, maxSize.cint, tmpDir)
proc plain_text*(htmlString: string): string =
result = $(dos_plain_text(htmlString.cstring))

View File

@ -304,3 +304,4 @@ proc dos_qabstracttablemodel_parent(modelPtr: DosQAbstractTableModel, index: Dos
proc dos_qabstracttablemodel_index(modelPtr: DosQAbstractTableModel, row: cint, column: cint, parent: DosQModelIndex): DosQModelIndex {.cdecl, dynlib: dynLibName, importc.}
proc dos_image_resizer(imagePath: cstring, maxSize: cint, tmpDirPath: cstring): cstring {.cdecl, dynlib: dynLibName, importc.}
proc dos_plain_text(htmlString: cstring): cstring {.cdecl, dynlib: dynLibName, importc.}