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

Was working/now error on line 87 getNumChildren #58

Open
NancyHarvey opened this issue Nov 6, 2017 · 7 comments
Open

Was working/now error on line 87 getNumChildren #58

NancyHarvey opened this issue Nov 6, 2017 · 7 comments

Comments

@NancyHarvey
Copy link

See error image

The script worked great for a bunch of docs I converted last month, now I'm getting this error message and don't know how to fix.

@NancyHarvey
Copy link
Author

NancyHarvey commented Nov 20, 2017

@mangini - hi - any chance you can help me with this, please? I have a large document I need to convert and this is hanging me up. TIA

@evbacher
Copy link

Hi Nancy -- I won't speak for Renato, but I've been putting my side-project energies into a Docs add-on that extends the work Renato started. See https://github.com/evbacher/gd2md-html/wiki for information about gd2md-html. We've been using a version of this for a few years, and I released an external version a few months ago.

@NancyHarvey
Copy link
Author

@evbacher - thanks so much. I'll check it out!

@miro-ka
Copy link

miro-ka commented May 13, 2018

This has nothing to do with gdocs2md, but this is working for me (just copy it to your editor and you get markdown)

screen shot 2018-05-13 at 22 52 52

@codingthat
Copy link

Anyone else following along can have it skip unsupported stuff (which sometimes might not be noticeable at all) by changing line 87 to: if (!element.getNumChildren || element.getNumChildren()==0) {

@codingthat
Copy link

codingthat commented Jun 25, 2018

Better yet:

  if (!element.getNumChildren) {
    // just in case we would cut something whose absence wouldn't be obvious...
    return {"text": "<!-- There was something here that couldn't be converted.  It may be nothing, but you should compare this spot with the original to make sure nothing is missing.  Either way, delete this comment afterward. -->"};
  }  
  if (element.getNumChildren()==0) {
    return null;
  }  

@goose-life
Copy link

Out of interest, I used the above substitution (thanks so much @codingthat), and the warning comment printed where a column break had been inserted in the google doc to make subsequent pages landscape.

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

5 participants