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

Inline code not converted #31

Open
davidchoo12 opened this issue Sep 19, 2018 · 6 comments
Open

Inline code not converted #31

davidchoo12 opened this issue Sep 19, 2018 · 6 comments
Labels

Comments

@davidchoo12
Copy link

I have lots of inline code in my gdoc along styled with consolas font among words with Arial font. Those codes are not converted to adoc syntax.

@ggrossetie
Copy link
Owner

Hello @hidingmode
I believe it should work, could you please share a sample document where inline code are not converted ?

I'm using the following font name to guess if the text is an inline code:

https://github.com/Mogztter/asciidoc-googledocs-addon/blob/67e62eb547a174d889fa651935588d115b1ae360/app/Code.gs#L305-L321

@ggrossetie
Copy link
Owner

Thanks!
Indeed it's not working properly... I will investigate 🕵️‍♂️

ggrossetie added a commit that referenced this issue Sep 21, 2018
The app script API function "getTextAttributeIndices" now returns a set of text indices at which text formatting changes (including font changes)
@ggrossetie
Copy link
Owner

Previously the API was not able to detect font changes in a paragraph but now it's working.
I've updated the code and I will publish a new version soon.

You can review the code: #32

@davidchoo12
Copy link
Author

davidchoo12 commented Sep 21, 2018

I have tested the new code, but the issue still persists if the code is in the middle of a line:
case: lorem ipsum dolor sit amet
generated adoc: lorem ipsum dolor sit amet
expected adoc: lorem ipsum `dolor sit` amet

Also, some issues with the original example:
case: lorem ipsum dolor sit amet
expected adoc: lorem ipsum `dolor sit amet`

  • If i select the text with the end of line char
    generated adoc: lorem ipsum +dolor sit amet+
  • but if i select the text without the end of line char
    generated adoc: lorem ipsum dolor sit amet

@ggrossetie ggrossetie reopened this Sep 21, 2018
@ggrossetie
Copy link
Owner

ggrossetie commented Sep 21, 2018

Thanks for your feedback. As mentioned in my previous comment, it may be a limitation of the App Scripts API... I will investigate further to understand how getTextAttributeIndices is working.

@ggrossetie ggrossetie added the bug label Aug 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants