Skip to content

Commit

Permalink
Add function to strip html tags
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-ramos committed Aug 4, 2020
1 parent 2f26af6 commit 57d6e64
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/nimqml.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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))
1 change: 1 addition & 0 deletions src/nimqml/private/dotherside.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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.}

0 comments on commit 57d6e64

Please sign in to comment.