-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
backslash in search-replace and search-replace output dependent #3
Comments
Backslash is an escape character and gets processed or rather throws errors before the filter can do its work. You would need to use double backslash: "\quarto" is working. It then also needs to be doubled in the text. Your other suggestion, with format dependent replacements, sounds interesting. I think it could be done, but it will require a big rewrite, including defining some sensible yaml syntax, or making the filter read translation lists from files. I wish I had time for coding - it is not going to happen in the next six months or so. If you (or someone else) wants to tackle this enhancement, a pull request would be very welcome :-) |
Hello, I can't make it work \quarto either with one or two backslash
For my other suggestion, I found in the doc here a way to have a format-dependent option. I did not try but it seems that it is already directly implemented in quarto. contributes: |
Hmmm... It worked with double backslash for me. You need to put apostrophes around, and use double backslash also in the text. As to your suggestion using the extension yaml: I thought you wanted the end user to decide which replacements are used under html or under pdf format? The quarto feature lets you decide which filter is in action. You could actually use it for a quick-and-dirty solution making copies of the actual filter and changing the yaml keyword inside, to e.g. 'search-replace-html' |
@dropsplash , thank you for your feature suggestion! Ive put this into a separate issue, #4. Are you still having trouble with backslashes? If yes, which quarto version are you using? |
Format specific search replace is coming soon and is followed in #4 |
Hello,
Thanks for yout code; very useful.
Would it be possible to have in
search-replace:
\quarto : "Quarto something"
"\quarto": "Quarto something"
"\quarto": "Quarto"
It seems that the backslash in any form of the previous yaml header can not be used to trigger a search-replace; maybe I missed something
Also, it would be nice to have the possibility of having a search replacement that is format output-dependent. The same keyword with different output depending on the format is pdf, HTML, Latex, or Word. Do you have any idea how to do that?
Many thanks
Regards
The text was updated successfully, but these errors were encountered: