mirror of
https://git.sr.ht/~cadence/bibliogram
synced 2026-03-01 18:31:35 +00:00
Add remove hashtags setting
This commit is contained in:
parent
ba5a5a7653
commit
ea81b945ce
7 changed files with 180 additions and 6 deletions
|
|
@ -2,7 +2,7 @@ const constants = require("../constants")
|
|||
const {proxyImage, proxyExtendedOwner} = require("../utils/proxyurl")
|
||||
const {compile} = require("pug")
|
||||
const collectors = require("../collectors")
|
||||
const {structure} = require("../utils/structuretext")
|
||||
const {structure, removeTrailingHashtags} = require("../utils/structuretext")
|
||||
const TimelineBaseMethods = require("./TimelineBaseMethods")
|
||||
const TimelineChild = require("./TimelineChild")
|
||||
require("../testimports")(collectors, TimelineChild, TimelineBaseMethods)
|
||||
|
|
@ -110,6 +110,12 @@ class TimelineEntry extends TimelineBaseMethods {
|
|||
else return structure(caption)
|
||||
}
|
||||
|
||||
getStructuredCaptionWithoutTrailingHashtags() {
|
||||
const structured = this.getStructuredCaption()
|
||||
if (!structured) return null // no caption
|
||||
else return removeTrailingHashtags(structured)
|
||||
}
|
||||
|
||||
/**
|
||||
* Try to get the first meaningful line or sentence from the caption.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue