Skip to content
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

Matching sub and super script at the start of a line #51

Open
ispringle opened this issue Sep 16, 2022 · 1 comment
Open

Matching sub and super script at the start of a line #51

ispringle opened this issue Sep 16, 2022 · 1 comment

Comments

@ispringle
Copy link
Contributor

In orgmode a superscript or subscript cannot be the first char in a line. To resolve this, you have to stick a U+FEFF (C-x 8 RET zero width no-break space RET) before the super/sub.

public subsuperscriptRe(): RegExp {

I can think of two or three resolutions. One option would be to explicitly allow super/sub in the #+OPTIONS property, then have uniorg look for this and if the option is set it would interpret all instances of ^:{} (or whatever is set) as a super/sub. This would have the added benefit of not turning snack_case_outside_of_code. I poked at the regexp but it's beyond me at the moment, might look again later though.

@rasendubi
Copy link
Owner

 ^super is supposed to be working already. The issue is likely caused by \S regex in JS not capturing   (rightfully), while Emacs' \S- does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants