• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

Parse aboutme problem

Scheduled Pinned Locked Moved General Discussion
2 Posts 1 Posters 314 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    alfazaz
    wrote on last edited by
    #1

    Hello !

    I added KaTeX (for mathematical formula) with a plugin to parse many things on my nodebb forum (posts content, topics title, shoutbox messages...). It runs, as necessary, before any markdown conversion (using action:markdown.updateParserRules to update parser to use MarkdownItTexmath).

    I have a problem to implement this also for the "About me" part in profile. It is not parsed like posts etc.

    I tried to use the "filter:parse.aboutme" hook but it's not working. Here is the reason : my parse function converts LaTeX formulas into an html specific code and it must do it before the markdown filter:parse.aboutme call. But, when this last one runs, it breaks all. For example, <span> is changed into &lt;/span&gt;...

    Is there a way to parse the aboutme content before markdown and without losing the html code ?

    A 1 Reply Last reply
    0
  • A Offline
    A Offline
    alfazaz
    replied to alfazaz on last edited by alfazaz
    #2

    Well, I found a solution using utils.decodeHTMLEntities for chars between dollars tags of KaTeX, before the markdown conversion. 🙂

    I hope it's not too much insecure...

    1 Reply Last reply
    0

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development